stderr and stdout get logged only if there was something to log