Changing print to log.msg