Added logger to remove console messages if required.