fixed writing into sqlhost file