Made debug_printf static to avoid multiple definition linking error