fix checking file already deleted