Updated check on file deleted