Set config defaults, added display_error for query.
Improved logging for query request/errors & DB.