add InternalError exception catch to debug