added write IO tests