ENHANCED: persistency library now uses setup_call_cleanup/3 for more
safety against errors while writing a new copy.