Added query data log statements