diff --git a/biopet.wdl b/biopet.wdl
index f9d2a6bd162cc82a8115b38f27be6c895205c682..545d6922f3f0391474b04943c3ccde713ab9ce92 100644
--- a/biopet.wdl
+++ b/biopet.wdl
@@ -70,25 +70,24 @@ task BaseCounter {
 task FastqSplitter {
     String? preCommand
     File inputFastq
-    String outputPath
-    Int numberChunks
-    String tool_jar
-    Array[Int] chunks = range(numberChunks)
+    Array[String] outputPaths
+    String toolJar
 
     command {
         set -e -o pipefail
         ${preCommand}
-        mkdir -p ${sep=' ' prefix(outputPath + "/chunk_", chunks)}
-        if [ ${numberChunks} -gt 1 ]; then
-            SEP="/${basename(inputFastq)} -o "
-            java -jar ${tool_jar} -I ${inputFastq} -o ${sep='$SEP' prefix(outputPath + "/chunk_", chunks)}/${basename(inputFastq)}
-        else
-            ln -sf ${inputFastq} ${outputPath}/chunk_0/${basename(inputFastq)}
-        fi
+        mkdir -p $(dirname ${sep=') $(dirname ' outputPaths})
+        if [ ${length(outputPaths)} -gt 1 ]; then
+            java -jar ${toolJar} \
+            -I ${inputFastq} \
+            -o ${sep=' -o ' outputPaths}
+          else
+            ln -sf ${inputFastq} ${outputPaths[0]}
+          fi
     }
 
     output {
-        Array[File] outputFastqFiles = glob(outputPath + "/chunk_*/" + basename(inputFastq))
+        Array[File] chunks = outputPaths
     }
 }
 
diff --git a/common.wdl b/common.wdl
index 2ac9cb99366ab27e768c29a947bf239064193186..d80d47e6d5a964b4ba2637741eeb62b51cecc2f2 100644
--- a/common.wdl
+++ b/common.wdl
@@ -106,7 +106,9 @@ task appendToStringArray {
 }
 
 task createLink {
-    File inputFile
+    # Making this of type File will create a link to the copy of the file in the execution
+    # folder, instead of the actual file.
+    String inputFile
     String outputPath
 
     command {