remove old debug code
also perform promive check when adding callbacks