fixing remove file from cache bug