Replace print to logger.debug()