Added query output for debugging.