Solution: Have a array of items before the writes, and on error clean all but them.
Solution:
Have a array of items before the writes, and on error clean all but them.