private static void LoadConfigs() { // --- Friends --- if (FileIo.FriendsExist()) { FileIo.StreamLoadFriends(out WaveMaker.Friends); if (WaveMaker.Friends == null) { Logging.Log("Internal Error", "Unable to load friends file"); throw new UnableToLoadException("Unable to load friends file"); } } else { FileIo.CreateFriends(out WaveMaker.Friends); if (WaveMaker.Friends == null) { Logging.Log("Internal Error", "Unable to create friends file"); throw new UnableToLoadException("Unable to create friends file"); } } // --- Settings --- if (FileIo.SettingsExist()) { FileIo.StreamLoadSettings(out WaveMaker.Settings); if (WaveMaker.Settings == null) { Logging.Log("Internal Error", "Unable to load settings file"); throw new UnableToLoadException("Unable to load settings file"); } } else { FileIo.CreateSettings(out WaveMaker.Settings); if (WaveMaker.Settings == null) { Logging.Log("Internal Error", "Unable to create settings file"); throw new UnableToLoadException("Unable to create settings file"); } } }