anchor.diff:  	    HasWarningMsg = refac_atom_utils:has_warning_msg(Pid),
   	    refac_atom_utils:output_atom_warning_msg(Pid, not_renamed_warn_msg(OldFunNameAtom), renamed_warn_msg(OldFunNameAtom)),
   	    refac_atom_utils:stop_atom_process(Pid),
  -	    refac_util:write_refactored_files([{{FileName, FileName}, AnnAST1}],
  -					      HasWarningMsg, Editor, TabWidth, Cmd)
  -    end.
  -
  -%%-spec(rename_fun_1/6::(string(), integer(), integer(), string(), [dir()], integer()) ->
  -%%	     {error, string()} | {ok, [filename()]}).
  -
  +	    refac_write_file:write_refactored_files([{{FileName, FileName}, AnnAST1}],
  +						    HasWarningMsg, Editor, TabWidth, Cmd)
  +    end.
  +
  +-spec(rename_fun_1/6::(string(), integer(), integer(), string(), [dir()], integer()) ->
  +	     {error, string()} | {ok, [filename()]}).
   rename_fun_1(FileName, Line, Col, NewName, SearchPaths, TabWidth) ->
       rename_fun_1(FileName, Line, Col, NewName, SearchPaths, TabWidth, emacs).
       
  -%%-spec(rename_fun_1_eclipse/6::(string(), integer(), integer(), string(), [dir()], integer()) ->
  -%%	     {error, string()} | {ok, [filename()]}).
  +-spec(rename_fun_1_eclipse/6::(string(), integer(), integer(), string(), [dir()], integer()) ->
  +	     {error, string()} | {ok, [filename()]}).
   
   rename_fun_1_eclipse(FileName, Line, Col, NewName, SearchPaths, TabWidth) ->
       rename_fun_1(FileName, Line, Col, NewName, SearchPaths, TabWidth, eclipse).
   
   rename_fun_1(FileName, Line, Col, NewName, SearchPaths, TabWidth, Editor) ->
  -    Cmd = "CMD: " ++ atom_to_list(?MODULE) ++ ":rename_fun(" ++ "\"" ++
  -	    FileName ++ "\", " ++ integer_to_list(Line) ++
  +    Cmd = "CMD: " ++ atom_to_list(?MODULE) ++ ":rename_fun(" ++ "\"" ++ 
  +	    FileName ++ "\", " ++ integer_to_list(Line) ++ 
   	      ", " ++ integer_to_list(Col) ++ ", " ++ "\"" ++ NewName ++ "\","
  -		++ "[" ++ refac_misc:format_search_paths(SearchPaths) ++ "]," ++ integer_to_list(TabWidth) ++ ").",
  -    {ok, {AnnAST, Info}} = refac_util:parse_annotate_file(FileName, true, SearchPaths, TabWidth),
  +									    ++ "[" ++ refac_misc:format_search_paths(SearchPaths) ++ "]," ++ integer_to_list(TabWidth) ++ ").",
  +    {ok, {AnnAST, Info}} = wrangler_ast_server:parse_annotate_file(FileName, true, SearchPaths, TabWidth),
       NewName1 = list_to_atom(NewName),
       {ok, {Mod, Fun, Arity, _, DefinePos}} = interface_api:pos_to_fun_name(AnnAST, {Line, Col}),
       ?wrangler_io("The current file under refactoring is:\n~p\n", [FileName]),
       Pid = refac_atom_utils:start_atom_process(),
       {AnnAST1, _C} = do_rename_fun(AnnAST, {Mod, Fun, Arity}, {DefinePos, NewName1}),
       case refac_misc:is_exported({Fun, Arity}, Info) of
  -      true ->
  -	  ?wrangler_io("\nChecking client modules in the following search paths: \n~p\n", [SearchPaths]),
  -	  ClientFiles = refac_util:get_client_files(FileName, SearchPaths),
  -	  try
  -	    rename_fun_in_client_modules(ClientFiles, {Mod, Fun, Arity}, NewName, SearchPaths, TabWidth, Pid)
  -	  of
  -	    Results ->
  -		HasWarningMsg = refac_atom_utils:has_warning_msg(Pid),
  -		refac_atom_utils:output_atom_warning_msg(Pid, not_renamed_warn_msg(Fun), renamed_warn_msg(Fun)),
  -		refac_atom_utils:stop_atom_process(Pid),
  -		refac_util:write_refactored_files([{{FileName, FileName}, AnnAST1}| Results], 
  -						  HasWarningMsg,Editor,TabWidth, Cmd)
  -	  catch
  -	    throw:Err -> Err
  -	  end;
  -      false ->
  -	  HasWarningMsg = refac_atom_utils:has_warning_msg(Pid),
  -	  refac_atom_utils:output_atom_warning_msg(Pid, not_renamed_warn_msg(Fun), renamed_warn_msg(Fun)),
  -	  refac_atom_utils:stop_atom_process(Pid),
  -	  refac_util:write_refactored_files([{{FileName, FileName}, AnnAST1}],
  -					    HasWarningMsg, Editor, TabWidth, Cmd)
  +	true ->
  +	    ?wrangler_io("\nChecking client modules in the following search paths: \n~p\n", [SearchPaths]),
  +	    ClientFiles = wrangler_modulegraph_server:get_client_files(FileName, SearchPaths),
  +	    try
  +		rename_fun_in_client_modules(ClientFiles, {Mod, Fun, Arity}, NewName, SearchPaths, TabWidth, Pid)
  +	    of
  +		Results ->
  +		    HasWarningMsg = refac_atom_utils:has_warning_msg(Pid),
  +		    refac_atom_utils:output_atom_warning_msg(Pid, not_renamed_warn_msg(Fun), renamed_warn_msg(Fun)),
  +		    refac_atom_utils:stop_atom_process(Pid),
  +		    refac_write_file:write_refactored_files([{{FileName, FileName}, AnnAST1}| Results],
  +							    HasWarningMsg, Editor, TabWidth, Cmd)
  +	    catch
  +		throw:Err -> Err
  +	    end;
  +	false ->
  +	    HasWarningMsg = refac_atom_utils:has_warning_msg(Pid),
  +	    refac_atom_utils:output_atom_warning_msg(Pid, not_renamed_warn_msg(Fun), renamed_warn_msg(Fun)),
  +	    refac_atom_utils:stop_atom_process(Pid),
  +	    refac_write_file:write_refactored_files([{{FileName, FileName}, AnnAST1}],
  +						    HasWarningMsg, Editor, TabWidth, Cmd)
       end.
   
   
  
positive.code:     Cmd1 = "CMD: " ++ atom_to_list(?MODULE) ++ ":rename_fun(" ++ "\"" ++ 
  	     FileName ++ "\", " ++ integer_to_list(Line) ++ 
  	       ", " ++ integer_to_list(Col) ++ ", " ++ "\"" ++ NewName ++ "\","
  	++ "[" ++ refac_misc:format_search_paths(SearchPaths) ++ "]," ++ integer_to_list(TabWidth) ++ ").",
      case refac_misc:is_fun_name(NewName) of
  	true -> ok;
  	false -> throw({error, "Invalid new function name!"})
      end,
      {ok, {AnnAST, Info}} = refac_util:parse_annotate_file(FileName, true, SearchPaths, TabWidth),
      NewNameAtom = list_to_atom(NewName),
      {ok, ModName} = get_module_name(Info),
      case interface_api:pos_to_fun_name(AnnAST, {Line, Col}) of
  
negative.code:     NewNameStr = atom_to_list(NewNameAtom),
      Pid = refac_atom_utils:start_atom_process(),
      ?wrangler_io("The current file under refactoring is:\n~p\n", [FileName]),
      {AnnAST1, _C} = do_rename_fun(AnnAST, {Mod, OldFunNameAtom, Arity}, {DefinePos, NewNameAtom}),
      refac_atom_utils:check_unsure_atoms(FileName, AnnAST1, [OldFunNameAtom], f_atom, Pid),
      case refac_misc:is_exported({OldFunNameAtom, Arity}, Info) of
  	true ->
  	    ?wrangler_io("\nChecking possible client modules in the following search paths: \n~p\n", [SearchPaths]),
  	    ClientFiles = wrangler_modulegraph_server:get_client_files(FileName, SearchPaths),
  	    try
  		rename_fun_in_client_modules(ClientFiles, {Mod, OldFunNameAtom, Arity},
  					     NewNameStr, SearchPaths, TabWidth, Pid)
  	    of
  		Results ->
  		    HasWarningMsg = refac_atom_utils:has_warning_msg(Pid),
  		    refac_atom_utils:output_atom_warning_msg(Pid, not_renamed_warn_msg(OldFunNameAtom), renamed_warn_msg(OldFunNameAtom)),
  		    refac_atom_utils:stop_atom_process(Pid),
  		    refac_write_file:write_refactored_files([{{FileName, FileName}, AnnAST1}| Results],
  							    HasWarningMsg, Editor, TabWidth, Cmd)
  	    catch
  		throw:Err ->
  		    refac_atom_utils:stop_atom_process(Pid),
  