debug print query