Snapshotting improvements

- deal with read files (corrupted files)
- error reply on write failure