refactored $batch_mode to $export_mode, which is actually more descriptive