code: function(fileEntry) {
                var filename = fileObj.fileName.substring(0, fileObj.fileName.lastIndexOf('.'));
                var ext = fileObj.fileName.substring(fileObj.fileName.lastIndexOf('.'));
                var randomStr = randomString(); // if the file with fileName already exists, append the new filename with _randomStr ...
                fileObj.fileName = filename + '_' + randomStr + ext; // ... and file extension
                resolve({root:root, fileObj: fileObj});
              }
docs: the point is not to get the fileEntry, but check whether the file with fileName already exists, thus use "create: false"