should this function be static? if yes, please guard this function with `#ifdef DEBUG_ENABLED`