add more reliable shutdown handler
add simple Gauge helper