Using subprocess.run(), we are able redirect stdout and stderr to an external file. Is there any way to also redirect exit code as well?