Configure output directory depending on environment variable