Partially fixing bug in caching of stats file.