replaced a console log with using the logger lib instead