Trap closed channel error