if(log.isDebugEnabled()) {
if(log.isErrorEnabled()) {
  private void writeHostFile(File configDir, ComponentData hc) throws IOException {    if (hc.childCount() == 0) {      // host has no Nodes. Skip it      return;    }    String configFileName = hc.getName() + ".txt";    PrintWriter writer = new PrintWriter(new FileWriter(new File(configDir, configFileName)));    try {      ComponentData[] children = hc.getChildren();      for (int i = 0; i < hc.childCount(); i++) {	writer.print(children[i].getType() + " = ");	writeChildLine(writer, children[i]);      }    } catch (Exception e) {      if(log.isDebugEnabled()) {        log.error("Error writing config file: " + e);      }    }    finally {      writer.close();    }      }