Support exporting data to a file

[GitHub #1] How to export as file

TODO: we want to import data from a file.