changing logging to use util.log instead of console