Added support for query script.