code: static void open(File dir, String fileName) {
          if (dir.mkdirs() || dir.isDirectory()) {
              File file = new File(dir, fileName);
              try {
                  out = new PrintStream(TextFileOutputStreamFactory.createOutputStream(file), true, "UTF-8");
                  openedFile = file;
              } catch (IOException ex) {
                  ex.printStackTrace();
              }
          }
      }
docs: Create the debug log at the specified location if possible. If this call
  fails, {@link #isOpen} returns false and diagnostic information will be
  printed to System.err.