Fix data races happening between io pipes and program termination event
Add a changelog