private void doMain() throws FileNotFoundException {
      if (gedcomIn.isDirectory()) {
         for (File file : gedcomIn.listFiles()) {
            analyzeGedcom(file);
         }
      }
      else if (gedcomIn.isFile()) {
         analyzeGedcom(gedcomIn);
      }

      System.out.println("Total="+cntTotal+" with warnings="+ cntWarnings +" with errors="+ cntErrors);
      getWarnings().writeSorted(false, 1, warningsOut != null ? new PrintWriter(warningsOut) : new PrintWriter(System.out));
      getErrors().writeSorted(false, 1, errorsOut != null ? new PrintWriter(errorsOut) : new PrintWriter(System.out));
   }