anchor.diff:      Decoder = make_xmlns_decoder(TaggedSpecs),
       ResultAST = erl_syntax:form_list([Module, CompilerOpts, Exports|NewAST]),
       DirName = filename:dirname(Path),
  -    file:write_file(
  -      filename:join([DirName, ModName ++ ".erl"]),
  -      [erl_prettypr:format(ResultAST), io_lib:nl()]).
  +    case file:write_file(
  +           filename:join([DirName, ModName ++ ".erl"]),
  +           [erl_prettypr:format(ResultAST), io_lib:nl()]) of
  +        ok ->
  +            file:write_file(
  +              filename:join([DirName, ModName ++ ".hrl"]),
  +              [erl_prettypr:format(erl_syntax:form_list(RecordsAST)),
  +               io_lib:nl()]);
  +        Err ->
  +            Err
  +    end.
   
   make_xmlns_decoder(TaggedSpecs) ->
       Clauses = lists:map(
  
positive.code:                 end, [], Vars),
      "decode_" ++ string:join(NewVars, "_").
  
  %% Fun(Args) -> Body.
  make_function(Fun, Args, Body) ->
      erl_syntax:function(
  
negative.code:                 true ->
                       AST ++ AttrAST ++ CDataAST ++ NewState#state.ast
               end,
      NewRecords = if Silent ->
                           NewState#state.records;
                      true ->
                           make_record(Result, Labels) ++ NewState#state.records
                   end,
      NewLabels = [{NewLabel, make_dec_fun_name(NewParents), Spec}
                   |NewState#state.labels],
      NewState#state{ast = NewAST, labels = NewLabels, records = NewRecords};
  spec_to_AST(SpecName, _Parents, #state{all_specs = AllSpecs,
                                         silent = Silent} = State) ->
      case lists:keyfind(SpecName, 1, AllSpecs) of
  