anchor.diff:          {error, Error} ->
               concuerror_log:log(0, "\nerror\n~p\n", [Error]),
               error
  +    end.
  +
  +%% ---------------------------
  +-spec delete_temp_files(concuerror:options()) -> 'ok'.
  +delete_temp_files(Options) ->
  +    %% Delete temp directory (ignore errors).
  +    case lists:keymember('keep_temp', 1, Options) of
  +        true ->
  +            %% Retain temporary files.
  +            ok;
  +        false ->
  +            TmpDir = ets:lookup_element(?NT_INSTR, ?INSTR_TEMP_DIR, 2),
  +            {ok, TmpFiles} = file:list_dir(TmpDir),
  +            DelFile = fun(F) -> _ = file:delete(filename:join(TmpDir, F)) end,
  +            lists:foreach(DelFile, TmpFiles),
  +            _ = file:del_dir(TmpDir),
  +            ok
       end.
   
   %% ---------------------------
  
positive.code: 
  -module(concuerror_instr).
  -export([delete_and_purge/1, instrument_and_compile/2, load/1,
           new_module_name/1, check_module_name/3, old_module_name/1]).
  
  -export_type([macros/0]).
  
  
negative.code: %% ---------------------------
  %% Delete and purge all modules.
  -spec delete_and_purge(concuerror:options()) -> 'ok'.
  delete_and_purge(_Options) ->
      %% Unload and purge modules.
      ModsToPurge =
          [check_module_name(IM, none, 0) || {IM}<-ets:tab2list(?NT_INSTR_MODS)],
      Fun = fun (M) -> code:purge(M), code:delete(M) end,
      lists:foreach(Fun, ModsToPurge),
      %% Delete ?NT_INSTR_MODS, ?NT_INSTR_BIFS,
      %% ?NT_INSTR_IGNORED and ?NT_INSTR tables.
      ets:delete(?NT_INSTR_MODS),
  