Work work work.
Write out an export file on every application exit.