Cygwin seems to need explicit flush