Added exception handling for when starting the program takes place.