fileio example - compiles but needs threading