public void convertGedcom(File file) {
      try {
         Gedcom gedcom = parser.parseGedcom(file);
         OutputStream out = (gedcomOut != null ? new FileOutputStream(new File(gedcomOut, file.getName())) :
                                                 new ByteArrayOutputStream());
         writer.write(gedcom, out);
         if (gedcomOut != null) {
            out.close();
         }
         else {
            System.out.println(out.toString());
         }
      } catch (SAXParseException e) {
         logger.error("SaxParseException for file: "+file.getName()+" "+e.getMessage()+" @ "+e.getLineNumber());
      } catch (IOException e) {
         logger.error("IOException for file: " + file.getName() + " " + e.getMessage());
      } catch (RuntimeException e) {
         e.printStackTrace();
         logger.error("Exception for file: "+file.getName()+" "+e.getMessage());
      }
   }