now uses user preferences for file format