fix bug with delete file