A system and method for preventing damage to media files within a digital
camera comprise a power manager for detecting power failures, an
interrupt handler for responsively incrementing a counter device and a
removable memory driver for performing memory access operations,
evaluating the counter device to determine whether a power failure has
occurred during the memory access operation and for repeating the memory
access operation whenever a power failure has occurred during the memory
access operation.