check for file before trying to delete