Warning: avert your eyes if you have no idea how SQLite behaves internally in WAL mode

.
And in case you were extremely curious and wondering what happens to WAL checkpoints when the device is mounted over USBMS: it behaves completely sanely: Nickel commits the checkpoints before switching to USBMS, so the DB is perfectly sane & up-to-date at that point (provided it was sane to begin with, and the switch to USBMS was successful, which it should be, unless you have some really nasty crap running in the background).