added query debug api, updated dependencies, improved debugging