code: public void updateConfiguration(Configuration config, boolean createBackup) throws Exception {
          if (config == null) {
              throw new IllegalArgumentException("config must not be null");
          }
          Lock lock = this.configurationLock.writeLock();
          lock.lock();
          try {
              save(this.configFile, config, createBackup);
              this.configuration = new Configuration(config);
          } finally {
              lock.unlock();
          }
      }
docs: Updates the configuration and writes it to the {@link #getConfigFile() file}, overwriting
  the previous content of the file.
  
  @param config the new configuration
  @param createBackup if true a .bak file is copied from the original as a backup
  @throws Exception if the new configuration cannot be written to the file