Optionally send command output to stdio

It's a little ugly but it comes in handy. Probably a better way to do this?