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

Change-Id: I0d80160c809964026ce17d24cfdc48879e2845ef