This looks like the best place for it. If the check and import happens in the class init, GridFS & errors would need to be imported into a class variable to hand around.