Sorting of query files solved to make it easier for user input