Fixes #162 Log DML statements before executing the query