Replace all uses of echo with printf