Use printf instead of sprintf+echo