code: @Override
      public void updateConfig(final T config) throws Exception {
          final ValidationResults validationResults = validationService.validateEnabledConfig(config);
  
          if (!validationResults.isValid()) {
              throw new ConfigValidationException(validationResults);
          }
  
          final T initialConfig = getConfig();
          setConfig(config);
  
          safePostUpdate(config, initialConfig);
  
          try {
              writeOutConfigFile(this.config.get(), getConfigFileLocation());
          } catch (final IOException e) {
              setConfig(initialConfig);
              safePostUpdate(initialConfig, initialConfig);
  
              throw e;
          }
      }
docs: Validate the config with the supplied {@link ValidationService}, calls {@link #withoutDefaultLogin(Config)}
  and {@link #withHashedPasswords(Config)} before setting the config, and calls {@link #postUpdate}
  before writing the config to a file.
  
  @param config The new config
  @throws IOException               If an error occurs writing out the config file
  @throws ConfigValidationException If the supplied config is invalid.
  @throws Exception                 if an unspecified error occurs in postUpdate