add error printing