Changes to regard the cache file in case if it's filled