append query to dbexception logging