Correctly wire up stdout and stderr