Cleaned up the logging and beginning to add error proofing.
Trying to push changes upstream

Change-Id: Ib19ab6f947ba0e8e3b0f062ef3634f4a58669473


Change-Id: I0000000000000000000000000000000000000000