Issue #357: use printf instead of echo sprintf