title: Rewriting problem while loggin in iPhone
body: <p>i am using following code to log into a file...</p>
  
  <pre><code>NSData *dataToWrite = [[NSString stringWithString:@"log data"]     dataUsingEncoding:NSUTF8StringEncoding];
  
  NSString *docsDirectory = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,    NSUserDomainMask, YES) objectAtIndex:0];
  NSString *path = [docsDirectory stringByAppendingPathComponent:@"fileName.txt"];
  [dataToWrite writeToFile:path atomically:YES];
  </code></pre>
  
  <p>But when this method gets called again...it doest show the last entry...??</p>
  
  <p>Could anyone suggest?</p>
  
  <p>thanks</p>