Fixing the config options and also added a bit of logging.