Adding console.log for tracing