Add trace/debug callbacks