(main) fix bug of removing file.