Replace tbuf with obuf