anchor.diff:  
   -export([start/0, list/0, load/1, unload/1, stop/0]).
   
  +%%------------------------------------------------------------------------------
  +%% @doc Load all plugins
  +%% @end
  +%%------------------------------------------------------------------------------
  +-spec start() -> ok | {error, any()}.
   start() ->
  -    %% start all plugins
  -    %%
  -    ok.
  -
  -%%------------------------------------------------------------------------------
  -%% @doc Load all plugins
  -%% @end
  -%%------------------------------------------------------------------------------
  --spec load_all_plugins() -> [{App :: atom(), ok | {error, any()}}].
  -load_all_plugins() ->
  -    %% save first
  -    case file:consult("etc/plugins.config") of
  -        {ok, [PluginApps]} ->
  -            ok;
  -            %% application:set_env(emqttd, plugins, [App || {App, _Env} <- PluginApps]),
  -            %% [{App, load_plugin(App)} || {App, _Env} <- PluginApps];
  -        {error, enoent} ->
  -            lager:error("etc/plugins.config not found!");
  -        {error, Error} ->
  -            lager:error("Load etc/plugins.config error: ~p", [Error])
  -    end.
  -
  -%%------------------------------------------------------------------------------
  -%% List all available plugins
  +    case read_loaded() of
  +        {ok, AppNames} ->
  +            NotFound = AppNames -- apps(plugin),
  +            case NotFound of
  +                [] -> ok;
  +                NotFound -> lager:error("Cannot find plugins: ~p", [NotFound])
  +            end,
  +            {ok, start_apps(AppNames -- NotFound -- apps(started))};
  +        {error, Error} ->
  +            lager:error("Read loaded_plugins file error: ~p", [Error]),
  +            {error, Error}
  +    end.
  +
  +%%------------------------------------------------------------------------------
  +%% @doc List all available plugins
  +%% @end
   %%------------------------------------------------------------------------------
   list() ->
       {ok, PluginEnv} = application:get_env(emqttd, plugins),
  
positive.code: 
  plugin(AppFile) ->
      {ok, [{application, Name, Attrs}]} = file:consult(AppFile),
      Ver = proplists:get_value(vsn, Attrs),
      Descr = proplists:get_value(description, Attrs, ""),
      #mqtt_plugin{name = Name, version = Ver, descr = Descr}.
  
  
negative.code: %%% @end
  %%%-----------------------------------------------------------------------------
  
  -module(emqttd_plugin_mgr).
  
  -author("Feng Lee <feng@emqtt.io>").
  
  