Fix config-file overwriting and SQLExceptions on load