Make defer console async