Added console.log check to js