Optimize stdOut write performance