added a function to save a cache file to a specific location