Add console defer