io module: Simple File I/O Stream example, refactor