Federal judge slams Trump lawyer for sloppy work in election challenges