- implement open file to write to it
- add a writefile sample