anchor.diff:                        {error, {Error1, Filename}}
                 end;
            ({Mode, Filename}, {ok, Records0}) ->
  -              io:format(standard_error, "parsing ~p...~n", [Filename]),
  +              treehugger:log(Logger, debug, "parsing ~p...~n", [Filename]),
                 case dpcs:from_file(Filename, [Mode, YYYYMM, HospitalID], Logger) of
                     {ok, Records} ->
                         {ok, [{Mode, Records}|Records0]};
  
positive.code: parse_files(Files, HospitalID, YYYYMM, Logger) ->
      lists:foldl(
        fun({ff1, Filename}, {ok, Records0}) ->
                io:format(standard_error, "parsing ~p...~n", [Filename]),
                case dpcs_ff1:from_file(Filename, [YYYYMM, HospitalID], Logger) of
                    {ok, Records} ->
                        {ok, [{ff1, Records}|Records0]};
  
negative.code:     lists:foreach(fun({ff1, Records}) ->
                            [begin
                                 ok = md_record:put_json(C, Record, dpcs_ff1, Logger)
                             end || Record <- Records],
                            treehugger:log(Logger, info, "wrote ~p ff1 records into Riak.",
                                           [length(Records)]);
                       ({Type, Records}) ->
                            [begin
                                 ok = md_record:put_json(C, Record, dpcs, Logger)
                             end || Record <- Records],
                            treehugger:log(Logger, info, "wrote ~p ~p records into Riak.",
                                           [Type, length(Records)])
                    end, RecordsList),
      case md_record:mark_set_as_done(C, dpcs, Identifier) of
          ok ->
              ok;
          Error ->
              treehugger:log(Logger, error, "failed writing records into Riak: ~p", [Error]),
              throw(Error)
      end.
  
  %% -spec check_date_hospital(binary(), binary(), rec()) -> ok | {error, atom()}.
  