anchor.diff:      lager:info("obsoletes: ~p", [Obsoletes]),
       lager:info("new: ~p", [NewBusLocationList]),
   
  +    case Obsoletes of
  +        [] -> ok;
  +        _ ->
  +            FileName = binary_to_list(BusId) ++ "_" ++ ".txt",
  +            {ok, IoDevice} = file:open(FileName, [append, {encoding, utf8}]),
  +            lists:foreach(
  +                fun({PlateNo, History}) ->
  +                        io:format(IoDevice, "{ \"~ts\" : [~p]}", [PlateNo, History])
  +                end, Obsoletes),
  +            ok = file:close(IoDevice)
  +    end,
  +
       erlang:send_after(?INTERVAL, self(), check),
       {noreply, State#state{ bus_location_list=NewBusLocationList} };
   handle_info(_Info, State) ->
  
positive.code:             UpdateDate = proplists:get_value(<<"updateDate">>, BusLocation),
              PlateNo    = proplists:get_value(<<"plateNo">>, BusLocation),
  
              lager:info("~ts, ~p, ~s", [PlateNo, StationSeq, UpdateDate]),
  
              {OldListUpdated, NewData} =
                  case lists:keytake(PlateNo, 1, OldList) of
  
negative.code:           bus_location_list=[]
           }).
  
  -define(FIRST_INTERVAL, 1000). % TODO: random interval
  %-define(INTERVAL, 30000). % 30 * 1000
  -define(INTERVAL, 60000). % 1 * 60 * 1000
  -define(URL, "http://api.pubtrans.map.naver.com/2.1/live/getBusLocation.jsonp?caller=pc_map&routeId=").
  %-define(URL, "http://localhost").
  
  