Check the existence of the file/directory to delete