debug hbcheck function