Added more logging to bundle building for when it fails due to IllegalStateException