anchor.diff:  
   
   get_indexed_offset(StreamID,From) ->
  -    File = cake_stream_manager:stream_filename(StreamID),
  +    {ok,File} = cake_stream_manager:stream_filename(StreamID),
       {ok,DataDir} = application:get_env(cake,data_dir),
       {ok,Data} = file:read_file(DataDir ++ File ++ "/" ++ File ++ ".index"),
       get_indexed_offset(Data,From,0).
  
positive.code: 
  
  retrieve_last_entry_at(StreamID,At) ->
      File = cake_stream_manager:stream_filename(StreamID),
      Offset = get_indexed_offset(StreamID,At),
      lager:debug("Offset from get_indexed_offset: ~p", [Offset]),
      DataFile = open_data_file(File),
  
negative.code:             case file:read(DataFile,Size+3) of
                  {ok,?MESSAGE} -> case CRC32 == erlang:crc32(Data) of
                                                  true -> case (TS >= From) and (TS =< To) of
                                                              true -> simple_query(DataFile,[<<TS:64/big-integer,Size:32/big-integer,Data/binary>>|FoundData],From,To);
                                                              false -> case TS < To of 
                                                                          true -> simple_query(DataFile,FoundData,From,To);
                                                                          false -> ok = file:close(DataFile),
                                                                                   list_to_binary(lists:flatten(lists:reverse(FoundData)))
                                                                      end
  