Rest of the IO logic.