Fix #58 add file mode to examples