code: synchronized void open() throws IOException {
      if (syncer == null) {
        syncer = new SyncThread();
        syncThread = new Thread(syncer);
        syncThread.start();
      }
      if (state != State.BETWEEN_LOG_SEGMENTS)
        throw new IOException("Bad state: " + state);
  
      startLogSegment(getLastWrittenTxId() + 1, true);
      if (state != State.IN_SEGMENT)
        throw new IOException("Bad state: " + state);
    }
docs: Create empty edit log files.
  Initialize the output stream for logging.
  
  @throws IOException