Added more informative exceptions to deserialization.