logging, middleware updates