Used the logging import instead of printing.