finished checking error to stop