Swap print statements for logging statements