Attempt to track down restart issue.

Upon restarting, the savesession file contains just rubbish, making the
new instance bug horribly.
=> Adding some debug messages for the next time this happens.