use printf instead of echo in testing framework