Fix #77 add file mode to examples