write my own trace function

do not use npm package tracer, write my own trace function instead.