Fix safety of shutdown
Avoid printing logs for tests
Make hashbits private and compute on initialization