MB-8202: Print error msg before exit

Change-Id: I4ce9a9762cc3a43d5a388fc7f7233f678ae92c02
Merge "MB-8202: Print error msg before exit"