simplify error printing