Changed echos to printf