try {
FileJournalManager jm = new FileJournalManager(storageDirectory);
for (int segment = 0; segment < numSegments; segment++) {
// start new segment
int firstTxId = currentTxId;
EditLogOutputStream out = jm.startLogSegment(currentTxId);
// starting transaction
FSEditLogOp startOp = new LogSegmentOp(
FSEditLogOpCodes.OP_START_LOG_SEGMENT);
startOp.setTransactionId(firstTxId);