Catch exceptions not to abort a program