Cover more race cases when managing the file cache file