Capture console output from sub process