Should be using flag from `engine` for all writes except last, I think.