made the choise of the mongo database depending on the run mode