Added uncaughtException catch