Capture the relevant exit code