Moved console.logs to using the debug module