Fix bugs and write a buildManifest.json file.