Fix file (re)moving bug