Add ExitCode segment
Improve sys.stdout statement
Add Ssh segment