added support for saving config file