Updated exception handling
Updated exception handling