better error formatting