Check the error codes properly.