Now uses sfx::FileWriter instead of std::ofstream