Added Exception handling hooks