Save the current data after a keyboard interrrupt.

Allow resuming.
Fix indentation.