separated io handling