Don't use flush(), it interferes with output buffers

Change-Id: I4262bebf04c90e9c2ee0d31cba2a9c83fc6b870b
Merge "Don't use flush(), it interferes with output buffers"