logging for delete function