anchor.diff:          Filename = mzb_api_bench:metrics_file(Config),
           Headers = [{<<"content-type">>, <<"text/plain">>},
                      {<<"content-encoding">>, ContentEncoding}],
  -        Req2 = cowboy_req:chunked_reply(200, Headers, Req),
  -        stream_from_file(Filename, Id, Req2),
  -        {ok, Req2, #{}}
  +        case bench_finished(Status) of
  +            true ->
  +                {ok, #file_info{size = FileSize}} = file:read_file_info(Filename),
  +                F = fun (Socket, Transport) ->
  +                    Transport:sendfile(Socket, Filename)
  +                end,
  +                Req2 = cowboy_req:set_resp_body_fun(FileSize, F, Req),
  +                {ok, cowboy_req:reply(200, Headers, Req2), #{}};
  +            false ->
  +                Req2 = cowboy_req:chunked_reply(200, Headers, Req),
  +                stream_from_file(Filename, Id, Req2),
  +                {ok, Req2, #{}}
  +        end
       end);
   
   handle(<<"GET">>, <<"/email_report">>, Req) ->
  
positive.code: stream_from_file(File, BenchId, Request) ->
      IsFinished =
          fun () ->
              case mzb_api_server:status(BenchId) of
                  #{status:= failed} -> true;
                  #{status:= complete} -> true;
                  #{status:= stopped} -> true;
                  #{status:= _} -> false
              end
          end,
      Streamer = fun (Bin) -> cowboy_req:chunk(Bin, Request) end,
      ReadAtOnce = application:get_env(mzbench_api, bench_read_at_once, undefined),
  
negative.code: 
  handle(<<"GET">>, <<"/logs">>, Req) ->
      with_bench_id(Req, fun(Id) ->
          #{config:= Config} = Status = mzb_api_server:status(Id),
          #{log_compression:= Compression} = Config,
          ContentEncoding =
              case Compression of
  