Previously there were explicit calls to fflush() in some code paths. Replace with making the file fully unbuffered in case users depended on this behaviour. Change-Id: If49cf6135c0d9fe41c8896d4137e204da780be31