Updated logging configuration; refactored retrieval code slightly.