Use %x in fmt strings instead of the hex package
Fix some error reporting in the name registrar