Added logging to console.