updated file cache check cache exists logic