changed print to log