guard open_file exception for cache_file