Added logger for SQL queries