Update file exporter for better header construction