Add import of traceback lib, add usgae of format_exc

Add logging in debug mode with format_exc function

Change-Id: Ieb30ff76430b987d3c2ca4e6502acd110696b613
Merge "Add import of traceback lib, add usgae of format_exc"