raise exception on illegal hash
debug output on illegal hash