Fix #69 add file mode to examples