The problem with the door not closing properly can be identified easily, if you will observe all the edges of the door and door frame from top to bottom. The most common problem will be paint. When you paint a door and the paint dries up after some time, you will find it very hard to close the door because the paint has taken up the space between the door and the door frames. What used to be a small gap between the door and the door frame is now not there anymore because of the paint. In fact, some paints can be quite thick that when it dries up, you can't close the door without scratching the edges of your door.
You can use a chisel to remove those paints and small thickness portion of the wooden edge of the door as well (It is like scraping off small layers of wooden door edge or the door frame). Then you will need to find a paint that applies very thin and light coating on the door edges and the door frames. After the new paint is applied, try closing the door again. This should solve the problem.