Added query name in output file