updated doc readbin and writebin