adding debug code to driApi