anchor.diff:          {Port, {data, {noeol, Line}}} ->
               sh_loop(Port, Fun, Fun(Line, Acc));
           {Port, {exit_status, 0}} ->
  -            {ok, lists:flatten(Acc)};
  +            {ok, lists:flatten(lists:reverse(Acc))};
           {Port, {exit_status, Rc}} ->
  -            {error, Rc}
  +            {error, {Rc, lists:flatten(lists:reverse(Acc))}}
       end.
   
   beam_to_mod(Dir, Filename) ->
  
positive.code: 
  expand_sh_flag(return_on_error) ->
      {error_handler,
       fun(_Command, Rc) ->
               {error, Rc}
       end};
  expand_sh_flag({abort_on_error, Message}) ->
      {error_handler,
       fun(_Command, _Rc) ->
               ?ABORT(Message, [])
       end};
  expand_sh_flag(abort_on_error) ->
  
negative.code:     {output_handler,
       fun(Line, Acc) ->
               ?CONSOLE("~s", [Line]),
               [Line | Acc]
       end};
  expand_sh_flag({use_stdout, false}) ->
      {output_handler,
       fun(Line, Acc) ->
               [Line | Acc]
       end};
  expand_sh_flag({cd, _CdArg} = Cd) ->
      {port_settings, Cd};
  