helloworld SR: redirect output to log.

Also improve overall quality.
(cherry picked from commit 7232c1e3409b65790d98d44467e4ef3739940478)