Replace print calls with logging.debug.