Capture stdout, stderr at runtime