Bugfix. Add example with fstream