Replace echo with printf