Added check for exception.