https://stackoverflow.com/questions/2985050/is-there-any-way...
It really saves the whole tree, not just the path that was active at the time of exit.