Better mongodb persistence