[Application] Add the check for return value of Begin().

This patch is to check the return value of Begin().

CID=194012
CID=194029

BUG=XWALK-2928