Robustified the cachefile checker.