Check the exit code.