Improving import/export features of the configuration

plus, better exception handling