Simplify error message printing