Saving applications to mongodb