cannot call logger from trap(…) block.