Refactor CSV file export for supporting Safari browser.