reversing the order of close-input-port / close-output port has no effect