Re-factory ConsoleOutputStream to generic class that could be used elsewhere.