io: create IO abstraction