Changed checkquery function in main.cpp to use an ifstream instead of fscan to fix file read bug