Required changes to configuration and added thrown exception