more robust logging, although only about 100 messages can be logged at a time without drops...