Add quit channel to avoid closing write channel