Debug functions for HQ script