check if the operation is successful when deleting