use properly sized variable when reading binary representation
install also logging.h

Otherwise the library may happily log into stderr.