store data in mongo db when press ctrl+s and command+s