Updated script to export env vars