Added {$set} to improve the insertions/updates in mongodb