better error message for localization