extract io operations to io module