modified queryanalyzer to support giving query from commandline