simplify error logging