update the exit code for error.