Plumb the hinge side of the door first, using shims as necessary. It's especially important to use shims behind the hinge plates.