Improve config and env variables with logging