Perhaps we should have a `writeBundle` util function as well that takes an array of keys/lines. That would consolidate things like adding the trailing new line