Add a new class UniOut. and make stdout and stderr wraps with UniOut

Add a UniOut class and wrap stdout and stderr.