anchor.diff:                              FinalCtx#context.req),
                           {ok, _NewReq} = send_file(Req2, Filepath, filename:basename(Filepath), Size)
                       catch Type:Message ->
  -                        {ok, User} = user_logic:get_user({login, gui_ctx:get_user_id()}),
                           ?error_stacktrace("Error while sending file ~p to user ~p - ~p:~p",
  -                            [Filepath, user_logic:get_login(User), Type, Message]),
  +                            [Filepath, UserLogin, Type, Message]),
                           {ok, _FinReq} = cowboy_req:reply(500, Req#http_req{connection = close})
                       end
               end
  
positive.code:             {ok, St, Context2} = SessHandler:init([], Context1),
              wf_context:context(Context2),
              {ok, UserDoc} = user_logic:get_user({login, gui_ctx:get_user_id()}),
              fslogic_context:set_user_dn(lists:nth(1, user_logic:get_dn_list(UserDoc))),
              {St, Context2, SessHandler}
          catch T1:M1 ->
              ?warning("Cannot establish session context for user content request - ~p:~p", [T1, M1]),
              error
  
negative.code:     case InitSession of
          error ->
              {ok, _RedirectReq} = page_error:generate_redirect_request(Req, ?error_user_content_not_logged_in);
          {State, NewContext, SessionHandler, UserLogin} ->
              % Try to get file by given path
              FileInfo =
                  try
  