Fix log queryfile