Added abstraction to switch streams to the ones within the console, and
restore back at shutdown.