Added error checking for config file. Will now create a new file if the existing one fails JSON validation or if the number of items in the cfgsettings array doesn't match the number in defaults.