Backup keys.dat before writing