Improved error handling and messaging.
Brought CoreConfig save method in line with similar methods.
Added tests.