Implement orderly exit
Revive tests after some code changes broke them
Fix revival of disk after it was loaded from state file
Add debug prints