anchor.diff:          [BaseId ++ Ext, Source, Target, to_binary(Reason)]),
       terminate_cleanup(State),
       couch_replicator_notifier:notify({error, RepId, Reason}),
  -    couch_replicator_manager:replication_error(Rep, Reason).
  -
  +    couch_replicator_manager:replication_error(Rep, Reason);
  +
  +terminate(shutdown, {error, Class, Error, Stack, InitArgs}) ->
  +    twig:log("~p:~p: Replication failed to start for args ~p: ~p",
  +        [Class, Error, InitArgs, Stack]).
   
   terminate_cleanup(State) ->
       update_task(State),
  
positive.code:     end.
  
  init(InitArgs) ->
      try
          do_init(InitArgs)
      catch
      throw:{unauthorized, DbUri} ->
          {stop, {unauthorized,
              <<"unauthorized to access or create database ", DbUri/binary>>}};
      throw:{db_not_found, DbUri} ->
          {stop, {db_not_found, <<"could not open ", DbUri/binary>>}};
      throw:Error ->
          {stop, Error}
      end.
  
  do_init(#rep{options = Options, id = {BaseId, Ext}} = Rep) ->
      process_flag(trap_exit, true),
  
negative.code:     couch_replicator_notifier:notify({error, RepId, <<"cancelled">>}),
      terminate_cleanup(State);
  
  terminate(Reason, #rep_state{} = State) ->
      #rep_state{
          source_name = Source,
          target_name = Target,
  