The strout variable was necessary in my commit, since it reads from stdout twice here - once for the exit code check, then again the logs.  Since it's an IO, the second read in the logging won't return any data.