read return -1 refer to error