anchor.diff:                    {?MQ_CNS_PROP_INTERVAL, Interval}
                    ]}, State, ?DEF_TIMEOUT};
   
  -handle_call(close, _From, #state{mq_properties = MQProps} = State) ->
  +handle_call(close, _From, #state{count = Count,
  +                                 state_filepath = StateFilePath,
  +                                 mq_properties = MQProps} = State) ->
       MQDBMessageId = MQProps#mq_properties.mqdb_id,
  -    ok = close_db(MQDBMessageId),
  +    ok = close_db(MQDBMessageId, Count, StateFilePath),
       {reply, ok, State, ?DEF_TIMEOUT};
   
   handle_call(stop, _From, State) ->
  
positive.code: init([Id, #mq_properties{db_name   = DBName,
                           db_procs  = DBProcs,
                           mqdb_id   = MQDBMessageId,
                           mqdb_path = MQDBMessagePath} = MQProps]) ->
      case application:get_env(leo_mq, backend_db_sup_ref) of
          {ok, Pid} ->
              ok = leo_backend_db_sup:start_child(
                     Pid, MQDBMessageId,
                     DBProcs, DBName, MQDBMessagePath),
              %% @TODO: Retrieve total num of message from the local mq's file
              Count = 0,
              {ok, #state{id = Id,
                          mq_properties = MQProps,
                          count = Count}, ?DEF_TIMEOUT};
          _Error ->
              {stop, 'not_initialized'}
      end.
  
negative.code: 
  %% @doc Close a db
  %% @private
  -spec(close_db(InstanceName, Count, StateFilePath) ->
               ok when InstanceName::atom(),
                       Count::non_neg_integer(),
                       StateFilePath::string()).
  close_db(InstanseName, Count, StateFilePath) ->
      %% Output the current state
      _ = leo_file:file_unconsult(StateFilePath, [{id, InstanseName},
                                                  {count, Count}
                                                 ]),
      %% Close the backend-db
      case whereis(leo_backend_db_sup) of
          Pid when is_pid(Pid) ->
              List = supervisor:which_children(Pid),
  