anchor.diff:  	_ -> throw({error, "Wrangler failed to rewrite the refactored files."})
       end.
   
  +write_refactored_files_for_preview(Files) ->
  +    F = fun ({{FileName,NewFileName}, AST}) ->
  +		FileFormat = file_format(FileName),
  +		SwpFileName = FileName ++ ".swp",
  +		case file:write_file(SwpFileName, list_to_binary(refac_prettypr:print_ast(FileFormat, AST))) of 
  +		    ok -> {{FileName,NewFileName},SwpFileName};
  +		    _  -> error
  +		end			
  +	end,
  +    FilePairs = lists:map(F, Files),
  +    case lists:any(fun(R) -> R == error end, FilePairs) of 
  +	true -> lists:foreach(fun(P) ->
  +				      case P of 
  +					  error -> ok;
  +					  {ok, {{_F,_NewF},SwpF}} -> file:delete(SwpF)
  +				      end
  +			      end, FilePairs),
  +		throw({error, "Wrangler failed to output the refactoring result."});
  +	_ -> wrangler_preview_server:add_files(FilePairs)
  +    end.
  +
   %% =====================================================================
   %% @spec tokenize(File::filename()) -> [token()]
   %% @doc Tokenize an Erlang file into a list of tokens.
  
positive.code:          get_var_exports/1, get_env_vars/1, get_bound_vars/1, get_free_vars/1, 
           get_client_files/2, expand_files/2, get_modules_by_file/1,
           reset_attrs/1, update_ann/2,parse_annotate_file_1/5, parse_annotate_file/3,
           parse_annotate_file/4,write_refactored_files/1,
           build_lib_side_effect_tab/1, build_local_side_effect_tab/2,
  	 build_scc_callgraph/1,build_callercallee_callgraph/1, has_side_effect/3,
           callback_funs/1,auto_imported_bifs/0, called_funs/3, file_format/1]).
  
negative.code: 			  concat_toks(Ts, [S|Acc]);
  	 {qatom, _, V} -> S=atom_to_list(V),
  			  concat_toks(Ts, [S|Acc]);
  	 {string, _, V} -> concat_toks(Ts,["\"", V, "\""|Acc]);
  	 {char, _, V} when is_integer(V) and (V =< 127)-> concat_toks(Ts,[io_lib:write_char(V)|Acc]);
  	 {char, _, V} when is_integer(V) ->
  	     {ok, [Num], _} = io_lib:fread("~u", integer_to_list(V)),
  	     [Str] = io_lib:fwrite("~.8B", [Num]),
  	     S = "$\\"++Str,
  	     concat_toks(Ts, [S|Acc]); 
  	 {_, _, V} -> concat_toks(Ts, [V|Acc]);
  	 {dot, _} ->concat_toks(Ts, ['.'|Acc]);
  	 {V, _} -> 
  	     concat_toks(Ts, [V|Acc])
       end.
  
  %% =====================================================================
  %% @spec parse_annotate_file(FName::filename(), ByPassPreP::bool(), SearchPaths::[dir()])
  