REFACTOR: move generate.files to export