Fixing a door gap problem
If you have a door that just barely catches the latch because the gap between the door and frame is too big, it's likely that the doors were installed poorly. Your doors were prehung in their frames at the factory and installed as a unit. The installer should have adjusted the frame with shims to leave about a 1/8-in. gap along the latch side, about the thickness of two quarters. If shims were forgotten or were not big enough, it results in a gap that's too wide.
To readjust the door frame, you have to remove the trim along the latch side to get at the shims. This job can be a hassle, especially if you have painted trim. So try this trick first. Slip a 1/16-in.-thick cardboard strip behind each hinge (Photos 1 and 2). This will widen the gap along the hinge side and narrow the gap along the latch side. Hopefully, it'll be enough to make the latch solid.