jpntrip: add trace function.