Fix remove file bug