Note: Bare in mind that simply searching for the substring "404" isn't reliable to diagnosing whether the page was found or not as "404" is fairly generic enough to be in any given web page. To properly test if the page wasn't found, you're going to need to get the response headers somehow to view the status.

You could do this via an HTTP instance as opposed to the limited INet API functions provided in the standard library.