anchor.diff:  
   chunk_out(Transport, Socket, IODevice) ->
       case file:read(IODevice, 4096) of
  -        eof         -> file:close(IODevice), sent;
  -        {error, E}  -> {error, E};
  +        eof         -> file:close(IODevice),
  +                       sent;
  +        {error, E}  -> file:close(IODevice),
  +                       {error, E};
           {ok, Chunk} -> Transport:send(Socket, Chunk),
                          chunk_out(Transport, Socket, IODevice)
       end.
  
positive.code:     {ok, ?req(with_amz_request_id, Rq), #state{dir = Dir}}.
  
  allowed_methods(Rq, St) ->
      {['GET'], Rq, St}.
  
  content_types_provided(Rq, St) ->
      {[{{<<"*">>, <<"*">>, []}, download}], Rq, St}.
  
  %% ===================================================================
  %%                         Content Accepted
  %% ===================================================================
  
  %% ===================================================================
  %%                         Content Provided
  
negative.code: download(#http_req{host=[Bucket|_], raw_path= <<"/",Path/binary>>}=Rq,
           #state{dir=Dir} = St) ->
      Filename = filename:join([Dir, Bucket, Path]),
      %% TODO move all the file concerns out of the helper functions below
      case file:read_file_info(Filename) of
          {ok, #file_info{size=Size}} ->
              {ok, Transport, Socket} = cowboy_http_req:transport(Rq),
  