break loop when status not OK