Log database queries to ``database_queries.log``

Making it somewhat simpler to diagnose exceptions arising from the database
:)