Add back console.log to flush buffer