Only decoding stdout and stderr when necessary.