docs: public synchronized void commit() throws IOException {
          if (logStream != null) {
              logStream.flush();
          }
          for (FileOutputStream log : streamsToFlush) {
              log.flush();
              if (forceSync) {
                  log.getChannel().force(false);
              }
          }
          while (streamsToFlush.size() > 1) {
              streamsToFlush.removeFirst().close();
          }
      }