adding a `then` to control any problem within the `success` of the `writeFileInBundle` promise.