now opens input, switches to i-0 before writes