Deleting file if ping successful