Use WSGI instead of HTTP requests for info about resources - see note about DGU. Improve logging generally.