Change level environment variable name
Fix trace level determination