Logging stdout and stderr