added sql statement logging