reset when serial unavailable?

The solution of disabling auto-reset is good.

A free alternative to SD is to use the on board EEPROM.
You could stash values away in there, and pick up where it leaves off. You could even switch the power off.
You would have to figure out when to store, but you'd have the same problem with SD.

There is a little library to use it

It only has 512 bytes, but probably enough.

HTH
GB