public static Properties load(String [] paths, String fileName) {
    Properties properties = null;
    File propertiesFile = null;
    try {
      String path = null;
      for(int i=0; i<paths.length; i++) {
        path = paths[i] + File.separator + fileName;
        propertiesFile = new File(path);
        if(propertiesFile.exists()) break;
      }
      if(!propertiesFile.exists()) {
        System.err.println("FATAL: could not find file '" + fileName +
                           "' in default search paths: ");
        for(int i=0; i<paths.length; i++) {
          System.err.print("'" + paths[i] + "'");
          if(i < paths.length - 1) 
            System.err.print(", ");
        }
        System.err.println();
        System.exit(1);
      }

      properties = refresh(propertiesFile.getAbsolutePath(), 
                           new FileInputStream(propertiesFile));
    }
    catch(Exception e) {
      System.err.println("ERROR: couldn't load properties from '" + 
                         propertiesFile + "'");
    }

    return properties;
  }