Change do_unpack order by MessagePack specification
Improve error handling.