Add sanity check to EnvelopeWriter and ChannelManager which requires envelope to contain at least a buffer or an event