Added IllegalArgumentException and RuntimeException catch