Replaced print with logging.