minor change in while logging