Replaced 'print' with 'logger' statements.