title: Add uiimage in nsdocumentdirectory and retrieve
body: <p>I am saving images to nsdocumentdirectory like this</p>
  
  <pre><code>NSArray *pathArr = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
                                                         NSUserDomainMask,
                                                         YES);
  NSString *path = [[pathArr objectAtIndex:0]
  
                    stringByAppendingPathComponent:@"img.data" ];
  
  NSLog(@"path=%@",path);
  
  
  NSData *retrievedData = [NSData dataWithContentsOfFile:path];
  
  imgView.image=[UIImage imageWithData:retrievedData];
  </code></pre>
  
  <p>The problem is only one image is saved. If I try to display an image the last saved image is displayed. How to solve this?</p>