added code to dbQuery to log sql queries and insert param data