implement try/catch in Main