Call to convert_to_csv moved to main