Added error check for no document root found in FindLinks