Check file exists before cleaning cache.