runCommandAndCaptureStdout