Writing temp data to mongo