use bufio when call write