And I guess there's no way to create a transaction between the file system and the sqlite db. I've often thought that would be a useful feature sometimes - maybe something in the sqlite API could write your file, and then commit when verified on the filesystem.