Copied exception catch to find string