How to duplicate stdout/stderr?