add metrics logging check

fix #144