Uses new dbg functions now.