Use error function instead of echo