[Reg] 2nd try fix Issue 13241 - writeln no longer flushes stdout