replaced console.log with winston logging