close channel on IOException. switch to expecting a channel of bytes instead of strings