Revert "change util.print to console.log"

This reverts commit f717975b4910a5e623b7547f3ee2669867c63bb5.
add print function to replace deprecated util.print