le
 {
 snprintf(thumbfn,sizeof(thumbfn),"%s.%s",av[i],T.tformat == LIBRAW_THUMBNAIL_JPEG ? "thumb.jpg" : "thumb.ppm");
 if( LIBRAW_SUCCESS != (ret = RawProcessor.dcraw_thumb_writer(thumbfn)))
 {
 fprintf(stderr,"Cannot write %s: %s\n",thumbfn,libraw_strerror(ret));
 // in the case of fatal error, we should terminate processing of the current file
 if(LIBRAW_FATAL_ERROR(ret))
 goto end;
 }
 }
 // Data unpacking
 ret = RawProcessor.dcraw_process();
 if(LIBRAW_SUCCESS != ret ) // error at the previous step
 {
