Proceed with updating only if search successful
Merge pull request #246 from kbidarkar/fix-update-func

Proceed with updating only if search successful