Also try to release pipes in case of error