modifying debug code for driApi