Changed System.exit() to 'throws Exception'