Added query name to results file