added check for the if the exception should dump