realize real stream-write and enlarge the buffer-size for effeciency