update exit code