fix error handling with unusable cache files