enhance libharu sanity check