output formatting, env var scope in tests fixed