Checking for error code.