fixed bug on reading query save location
added file io functions here temporarily