now I remember why I had in my thought implementation also put the messagesToLog in a closure (to be discarded)