implement reading queries from a file