}
  public void dumpINIFiles() {    ExperimentINIWriter cw = null;    theWholeSoc = null;    if (DBUtils.dbMode) {      if (theWholeSoc == null) {	// write it to the db	saveToDb(new DBConflictHandler() {	    public int handleConflict(Object msg, Object[] choices,                             Object defaultChoice) {	      return JOptionPane.showOptionDialog(null,						  msg,						  "Database Conflict",						  JOptionPane.WARNING_MESSAGE,						  JOptionPane.DEFAULT_OPTION,						  null,						  choices,						  defaultChoice);	    }	  });      }      if (theWholeSoc != null)	cw = new ExperimentINIWriter(theWholeSoc);    } else {      cw = new ExperimentINIWriter(getComponents(), getNodes(), this);    }        File resultDir = getResultDirectory();    // if user didn't specify results directory, save in local directory    if (resultDir == null) {      resultDir = new File(".");    }    Trial trial = getTrials()[0];    String dirname = resultDir.getAbsolutePath() + File.separatorChar +       getExperimentName() + File.separatorChar +      trial.getShortName() + File.separatorChar +      "INIFiles-dump";    File f = null;    try {      f = new File(dirname);      // guarantee that directories exist      if (!f.exists() && !f.mkdirs() && !f.exists()) 	f = new File(".");    } catch (Exception e) {      JOptionPane.showMessageDialog(null, "Couldn't create results directory: " + e, "Can't create directory", JOptionPane.ERROR_MESSAGE);      if(log.isErrorEnabled()) {        log.error("Couldn't create results directory: ", e);      }    }    if (f != null) {      try {	JOptionPane.showMessageDialog(null, "Writing ini file to " + f.getAbsolutePath() + "...");	//	System.out.println("Writing ini files to " + f.getAbsolutePath() + "...");	cw.writeConfigFiles(f);      } catch (Exception e) {        if(log.isErrorEnabled()) {          log.error("Couldn't write ini files: ", e);        }      }    }  }