Simplify state handling in BundleFile