Added exception to log in Main class