changing the logic when no cache file