Need to call close on `Z`.