checkForErrors