public static void main(String[] args) throws Exception {
    processConfigFile(args[1]);
    try {
      maxFiles = Integer.parseInt(args[2]);
    } catch (Exception e) {
      maxFiles = Integer.MAX_VALUE;
    }
    try {
      SpotSigs.minIdf = Double.parseDouble(args[3]);
      System.out.println("minIdf=" + SpotSigs.minIdf);
    } catch (Exception e) {
    	try {
    	      SpotSigs.dupsFile = args[3];
    	      System.out.println("dumping duplicates to dupsFile = " + SpotSigs.dupsFile);
    	    } catch (Exception ex) {
    	    }
    }
    try {
      SpotSigs.maxIdf = Double.parseDouble(args[4]);
      System.out.println("maxIdf=" + SpotSigs.maxIdf);
    } catch (Exception e) {
    	try {
  	      SpotSigs.caseName = args[4];
  	      System.out.println("Case name = " + SpotSigs.caseName);
  	    } catch (Exception ex) {
  	    }
    }
    try {
      SpotSigs.confidenceThreshold = Double.parseDouble(args[5]);
      System.out.println("conf=" + SpotSigs.confidenceThreshold);
    } catch (Exception e) {
    	try {
    	      SpotSigs.resultsFile = args[5];
    	      System.out.println("results file = " + SpotSigs.resultsFile);
    	    } catch (Exception ex) {
    	    }
    }
    try {
      SpotSigs.k = Integer.parseInt(args[6]);
      System.out.println("k=" + SpotSigs.k);
    } catch (Exception e) {
    }
    try {
      SpotSigs.l = Integer.parseInt(args[7]);
      System.out.println("l=" + SpotSigs.l);
    } catch (Exception e) {
    }
    keys = new HashMap<String, Integer>(1000000);
    invKeys = new HashMap<Integer, String>(1000000);
    files = new ArrayList<File>();
    scanDirs(new File(args[0]));
    numFiles = files.size();
    new SpotSigsIndexer(files).work();
  }