add Coprocess, fix BufferedWriter bugs