Added option to export for both production and test environments.