more queries and an output file