Fix file history on file delete