1.preventing race condition with two updateContent API calls

2.preventing deletion of source in replacing an entry