Use environment variable for mode.