io: make closing | optional