Adding option for database-driven config, and more logging