Fixed Problem with reading query file