/// <summary>
        /// Constructor
        /// </summary>
        /// <param name="monitor"></param>
        /// <param name="catchAllMessages">
        /// False by default and not recommanded to set as true because of the performance.
        /// So far, it is only used in Grouping test scenario
        /// </param>
        internal CaptureFileSession(IMonitor monitor, string filePath, bool isDisablePersistence, bool catchAllMessages)
            : base(monitor)
        {
            this.catchAllMessages     = catchAllMessages;
            this.isDisablePersistence = isDisablePersistence;

            // Only use a default query, Since the query of CaptureJournal of LiveCapture will be updated when start.
            QueryBuilder qb = monitor.CreateQueryBuilder();

            qb.FromCompleted();
            qb.FromAborted();
            qb.FromStalled();
            Query query = qb.Compile();

            captureJournal = monitor.CreateCaptureJournal(query);
            viewJournal    = captureJournal.CreateView(monitor.CreateQueryBuilder().Compile());
            captureJournal.DisablePersistence = isDisablePersistence;

            // Create and initial capture session for capturJournal
            CaptureSession.CreateCaptureSession(monitor, captureJournal, false);
            IMessageReader messageReader = CreateMessageReader(filePath);

            captureJournal.CaptureSession.AddReader(messageReader);

            // Create Monitor work control thread
            monitorWorkControlThread = new Thread(new ThreadStart(MonitorWorkControl));
            monitorWorkControlThread.IsBackground = true;

            if (this.catchAllMessages)
            {
                frameStorage = new FramesStorage();
            }

            // Create Monitor work control thread
            monitorWorkControlThread = new Thread(new ThreadStart(MonitorWorkControl));
            monitorWorkControlThread.IsBackground = true;
        }