cannot get SD.exists to work from example code

Have not been able to get SD.exists working using some examples. Have written to card and produce d files but trying to open file in browser.

here is output on monitor showing card reading directories. Tried rewind and delays from setup.

Free RAM: 692
Volume is FAT16

Files found in root:
TEST.JPG 2015-02-05 15:44:18 37844
TEST2.JPG 2000-01-01 01:00:00 62656
TEST3.JPG 2000-01-01 01:00:00 62656
TEST4.JPG 2000-01-01 01:00:00 62656

Files found in all dirs:
TEST.JPG
TEST2.JPG
TEST3.JPG
TEST4.JPG

Done
GET / HTTP/1.1
GET /TEST3.JPG HTTP/1.1
TEST3.JPG
file Not Found:TEST3.JPG:

          // print all the files, use a helper to keep it clean
          client.println("<h2>Files:</h2>");
          ListFiles(client, LS_SIZE);
        } else if (strstr(clientline, "GET /") != 0) {
          // this time no s
          // pace after the /, so a sub-file!

          char filename[14] = "12345678.123";
 
          (strstr(clientline, " HTTP"))[0] = 0;

          // look after the "GET /" (5 chars)
          // a little trick, look for the " HTTP/1.1" string and 
          // turn the first character of the substring into a 0 to clear it out.
          int i;
          
          for( i=0; filename[i]>0 ;i++)
          {
            filename[i] = clientline[i + 5];
          }
          filename[i] = 0;

          // print the file we want
          Serial.println(filename);
          
          root.rewind();
          delay(30);
          
          if (SD.exists(filename)) {
            root.rewind();
            delay(30);
            myfile = SD.open( filename, FILE_READ);
            if (!myfile)
            {
             Serial.println("Failed Open");
             break;
            }
            client.println("Content-Type: text/html");
            client.println();
            Serial.println("Opened!");
          }
            else
          {
            root.rewind();
            delay(30);
            client.println("<h2>File Not Found!</h2>");
            client.println("HTTP/1.1 404 Not Found");
            Serial.print("file Not Found:");
            Serial.print(filename);
            Serial.println(":");          
            break;
          }

thanks

Okay,

been working on this a while and found some major issue.

ADLIB16 pointed out in another post the card,root, volume are used in SD.h and also I forgot to do SD.begin(4); (arduino sethernet shield.

thanks