Fix for #28
Fix for #28
Solving same issue of #28 for query and queryfile