improve detailed error message