new support for flush of stdout