Compare files more intelligently