Change query input method: directly read from file