do a check for errors