split IO operations in 2 files