Add error handling for reading configuration from the environment
Shorten ddg results if necessary