renamed sendErrCh to sendEndCh