Added error checking on values when read from binary.
Added support from "set" from register