remove from main toolbar
remove unused import
refactor csv writing; add error handling around IO