src/channel-type.c (ptob_write): Improve.

* src/channel-type.c (ptob_write): Improve error handling.  Add a
  comment.  Remove debug information.