Fix #58 add file mode to examples
Merge pull request #59 from jhx/issue_58_add_file_mode_to_examples

Fix #58 add file mode to examples