check for exceptions