code: private TxnRecord getTxnRecord(Path indexFilePath) throws IOException {
          Path tmpPath = tmpFilePath(indexFilePath.toString());
          if (this.options.fs.exists(indexFilePath)) {
              return readTxnRecord(indexFilePath);
          } else if (this.options.fs.exists(tmpPath)) {
              return readTxnRecord(tmpPath);
          }
          return new TxnRecord(0, options.currentFile.toString(), 0);
      }
docs: Reads the last txn record from index file if it exists, if not
  from .tmp file if exists.
  
  @param indexFilePath the index file path
  @return the txn record from the index file or a default initial record.
  @throws IOException