try { logFile.close(); doc.fillFromLogFile(logFileName); logFile = new BufferedWriter(new FileWriter(logFileName, true)); } catch (Exception e) { System.out.println(e);
synchronized (logFileLock) { try { logFile.close(); doc.fillFromLogFile(logFileName); logFile = new BufferedWriter(new FileWriter(logFileName, true)); } catch (Exception e) { System.out.println(e); }
  public void fillFromLogFile() {    try {      logFile.close();      doc.fillFromLogFile(logFileName);      logFile = new BufferedWriter(new FileWriter(logFileName, true));    } catch (Exception e) {      System.out.println(e);    }  }