added debug setting to LocaleHelper and suppressed error messages when debugging is off