writestream implementation 1.0