The file type is always ".jpg" from 
 fileType = Utility.getFileExtension(entry.fileName) which uses last indexof. but I will changes this any way I just forgot.