Improved 'already processed' message

Change-Id: I3e5ccf20335ac7b262b9a73ae7351c70ab92a972
diff --git a/script/korapxml2krill b/script/korapxml2krill
index cedd84e..ecb50fb 100644
--- a/script/korapxml2krill
+++ b/script/korapxml2krill
@@ -468,8 +468,11 @@
       # Get the next fork
       $pool->start and next DIRECTORY_LOOP;
 
-      if ($batch_file->process($dirs[$i] => $filename)) {
-        $pool->finish(0, ["Processed " . $filename]);
+      if (my $return = $batch_file->process($dirs[$i] => $filename)) {
+        $pool->finish(
+          0,
+          ["Processed " . $filename . ($return == -1 ? " - already existing" : '')]
+        );
       }
       else {
         $pool->finish(1, ["Unable to process " . $dirs[$i]]);
@@ -526,9 +529,13 @@
         my $dir = catdir($input, $doc, $text);
 
         # Write file
-        if ($batch_file->process($dir => $filename)) {
+        if (my $return = $batch_file->process($dir => $filename)) {
           # Delete temporary file
-          $pool->finish(0, ["Processed " . $filename, $temp]);
+          $pool->finish(
+            0,
+            ["Processed " . $filename . ($return == -1 ? " - already existing" : ''), $temp]
+          );
+          #$pool->finish(0, ["Processed " . $filename, $temp]);
         }
         else {
           # Delete temporary file