Check and trigger safe mode if needed.
Enter safe mode.
A tip on how safe mode is to be turned off: manually or automatically.
Check if safe mode was entered manually or at startup.
Check if safe mode is on.
There is no need to enter safe mode if DFS is empty or #threshold == 0
Print status every 20 seconds.
Set total number of blocks.
Check if safe mode was entered due to resources being low.
Check whether we have reached the threshold for initializing replication queues.
Checks consistency of the class state. This is costly so only runs if asserts