if (PdfName.F.equals(type) || PdfName.FILESPEC.equals(type)){
PdfDictionary ef = (PdfDictionary) PdfReader.getPdfObject(filespec.get(PdfName.EF));
PdfString fn = (PdfString) PdfReader.getPdfObject(filespec.get(PdfName.F));
if (fn != null && ef != null){
LOG.debug("Unpacking file " + fn + " to " + outPath);
File fLast = new File(fn.toUnicodeString());
File fullPath = new File(outPath, fLast.getName());
if (fullPath.exists()){
//check if overwrite is allowed
if (overwrite){
if(!fullPath.delete()){