Also worthy of note, to avoid an Exception, you might try casting each DBObject opened using the 'as' operator and then test for if != null.
Additionally, three no no need to open each DBObject ForWrite; simply open ForRead, and the. UpgradeOpen() the few Object you actually need.