Better exception handling
improved exception handling