Save attachements as separate files
Remove unnecessary code