try { path = file.getCanonicalPath(); } catch (Exception e) {
if (file != null) { try { path = file.getCanonicalPath(); } catch (Exception e) { if(log.isWarnEnabled()) { log.warn("Could not find: " + filename); } } } else {
  public static String getPath(String filename) {    Logger log = CSMART.createLogger("org.cougaar.tools.csmart.ui.util.Util");    ConfigFinder configFinder = ConfigFinder.getInstance();    File file = configFinder.locateFile(filename);    String path = null;    try {      path = file.getCanonicalPath();    } catch (Exception e) {      if(log.isWarnEnabled()) {        log.warn("Could not find: " + filename);      }    }    return path;  }