modified print to log