Prevent multiple loading of cache files and improve logging.