add Try Catch in Main Class