store metadata into mongodb