always flush stdout after write