Explicitly specify UTF-8 as config file charset
Throw proper exception if serializing unregistered class
Fix use of wrong value in error message.