fix bug: file never be deleted