Fix delete file bug