Added export to CSV in batch mode