Add `writeManifest` method
Add comments