if(!destination.exists()){ byte[] data = entry.getValue().getBody().getAttachmentId() != null ? gmailService.users().messages().attachments().get("me", message.getId(), entry.getValue().getBody().getAttachmentId()).execute().decodeData() : entry.getValue().getBody().decodeData(); Puzzle puzzle = singleFilename.endsWith("jpz") ?