added support for optional query object on listeners
added support for verbose mode