added debug log functions