anchor.diff:  is_cached_file_recent(LocalName) when is_binary(LocalName) ->
       T = fun() -> mnesia:read(podrec_feed, LocalName) end,
       case mnesia:transaction(T) of
  -        {atomic, [#podrec_feed{last_fetch=LastFetch}]} ->
  +        {atomic, [#file{last_fetch=LastFetch}]} ->
               % TODO: LastFetch might be undefined
  -            FeedRecent = podrec_util:get_env(feed_recent, 600),
  -            erlang:system_time(seconds) - LastFetch < FeedRecent;
  +            case LastFetch of
  +                undefined ->
  +                    false;
  +                _ when is_integer(LastFetch) ->
  +                    FeedRecent = podrec_util:get_env(feed_recent, 600),
  +                    erlang:system_time(seconds) - LastFetch < FeedRecent
  +            end;
           {atomic, []} ->
               false
       end.
  
positive.code: 
  -record(state, {jobs=#{}}).
  
  -record(podrec_feed, {local_name, orig_url, last_fetch}).
  
  -compile(export_all).
  
  
negative.code:     T = fun() -> mnesia:read(podrec_feed, LocalName) end,
      case mnesia:transaction(T) of
          {atomic, [Feed]} ->
              {ok, Feed#file.orig_url};
          {atomic, []} ->
              ConfiguredFeeds = podrec_util:get_env(feeds),
              case maps:get(LocalName, ConfiguredFeeds, undefined) of
                  undefined -> {error, unknown_feed};
                  OriginalUrl ->
                      ok = add_feed_to_db(#file{local_name=LocalName, orig_url=OriginalUrl}),
                      {ok, OriginalUrl}
              end
      end.
  
  add_feed_to_db(Feed) when is_record(Feed, file) ->
      lager:info("adding ~p to database", [Feed#file.local_name]),
      {atomic, ok} = mnesia:transaction(fun() -> mnesia:write(podrec_feed, Feed, write) end),
      ok.
  
  
  