import json
import logging


class Config(object):
    def __init__(self, path):
        self.path = path
        self.load()

    def get(self, key, default=None):
        return self._data.get(key, default)

    def set(self, key, value):
        self._data[key] = value

    def load(self):
        try:
            self._data = json.load(open(self.path, 'r'))
        except Exception:
            logging.warning('Unable to load configuration at {0}'.format(self.path))
            self._data = {}

    def write(self):
        json.dump(self._data, open(self.path, 'w'), sort_keys = True, indent = 4)
@@ -357,16 +357,149 @@
 , 'r'))%0A
+        except IOError:%0A            logging.info('No configuration file found at %7B0%7D'.format(self.path))%0A            self._data = %7B%7D%0A
         
@@ -732,8 +732,78 @@
 ent = 4)
+%0A        logging.debug('Saved configuration at %7B0%7D'.format(self.path))

Add logging when an error occurs with config