Fix CSimpleFileCache::WaitData, remove wrong code and correct the logic.