Better error handling for memc and some comments

Change-Id: Ibdd49677c7eac6b8d601ea1d317c0a4d61e42943
Merge "Better error handling for memc and some comments"