print replaced with logging