Queries should be read from external files

File contains query in first line and supposed results in next lines.