Print
Add close conditional
Handle terminating differently