test for existence before deleting the file