Fix broken file detection.