added logging of environment variables. Helps #455