I never sand, plane, cut down a door due to closing problems, because when the foundations shifts the other way, you will wish that you had that removed piece of wood.
Always attack the hinges first. a shim or washer here will do wonders when conforming a square door to a unsquare frame.
Just a key thought, shiming the bottom hinge will lift the door up and close up top gaps. you will have to find the magical shim size and most certainly have to use longer screws as the shim becomes wider.