if writeToFile succeeded the file needs to be deleted.  Nothing to delete on failure.