Ios app updates clearing the existing files (images, audio, video ) created

I am using ng-cordova in my mobile application, in my mobile application user can capture image, audio and video files, all the files will be stored in cordova.file.dataDirectory file system. whenever i update the application all the existing captured files has been removed, if refer the existing path, its showing nothing.