Added try catch to main, dialog will be displayed

with stack trace.