convert print statements to logger.debug