Save the config data

        Args:
            data: any serializable config data

        Raises:
            ConfigLoaderException: if the ConfigLoader.load not called, so there is no config file name,
                                   or the data is not serializable or the loader is nested

def save(self, data):
        """Save the config data

        Args:
            data: any serializable config data

        Raises:
            ConfigLoaderException: if the ConfigLoader.load not called, so there is no config file name,
                                   or the data is not serializable or the loader is nested
        """
        if self.__nested:
            raise ConfigLoaderException("Cannot save the config if the 'nested' paramter is True!")

        if self.__loaded_config_file is None:
            raise ConfigLoaderException("Load not called yet!")

        try:
            with open(self.__loaded_config_file, 'w') as f:
                f.write(self.__formatter.encode(data))
        except Exception as e:
            raise ConfigLoaderException("Config data is not serializable: %s" % e)