@Override
    protected void execute(Path file) throws Exception {
        
        BufferedImage img = ImageIO.read(file.toFile());
        if (img.getWidth() > img.getHeight()) {
            rotate(file, file, PI_BY_2);
        }
        
        String targetName = null;
        String name = getName(file);
        
        if (name.startsWith("QR")) {   // QR Code            
            String signature = name.split(SEP)[2];
            Result result = decode(file);
            String code = result == null ? "CND" : result.getText();
            
            switch (code.toUpperCase()) {
            case "CND":         //Could Not Detect
                targetName = String.format("%s%s", signature, MANUAL_DETECT);
                break;
            case BLANK_CODE:    //Blank Page
            case "ATTACHMENT":  //Reference Sheet
                break;
            default:            //Noteworthy QRCode
                targetName = String.format("QR_%s_%s%s", code, signature, DETECTED);
            }
            
        } else {                        // Graded Response ID
            targetName = name + DETECTED;
        }

        if (targetName != null) {
            Path targetFile = file.resolveSibling(targetName);            
            if (!Files.exists(targetFile))
                resize(file, targetFile, WIDTH, HEIGHT);
        }
        Files.delete(file);
    }