Added a check if file is deleted