Merge "Add more logs for writing failures." into oc-dr1-dev am: 3c7cde0cd4
am: 36fd8c35a7

Change-Id: I6b5e2e61fe32f290f5ed6ebcc763b2e98d92448f