move debugf to debug.c