Fix initDb file for close and missing collections.