refactoring around LoadConfig/SaveConfig