Export to file data and structure