bug in reading query file