diff --git a/CHANGELOG.md b/CHANGELOG.md
index df1032a4fa48248c6f6e06982cd6a523da3f4287..70a8349a8a948035f1e73e9a1121025c6ded19f9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ that users understand how the changes affect the new version.
 -->
 version 3.1.0
 ---------------------------
++ Isoseq3: Remove dirname command from output folder creation step.
 + Isoseq3: Requires more memory by default, is now 2G.
 + Isoseq3: Remove cp commands and other bash magic, file naming is now solved by pipeline.
 + Lima: Replace mv command with cp.
diff --git a/isoseq3.wdl b/isoseq3.wdl
index 007aa00204b141dfc2884b8df1aa95271395458d..10d87bbc2264ac1aad7661f8ab8786249503684a 100644
--- a/isoseq3.wdl
+++ b/isoseq3.wdl
@@ -35,9 +35,9 @@ task Refine {
         String dockerImage = "quay.io/biocontainers/isoseq3:3.3.0--0"
     }
 
-    command <<<
+    command {
         set -e
-        mkdir -p "$(dirname ~{outputDir})"
+        mkdir -p "~{outputDir}"
         isoseq3 refine \
         --min-polya-length ~{minPolyAlength} \
         ~{true="--require-polya" false="" requirePolyA} \
@@ -47,7 +47,7 @@ task Refine {
         ~{inputBamFile} \
         ~{primerFile} \
         "~{outputDir}/~{outputNamePrefix}.bam"
-    >>>
+    }
 
     output {
         File outputFLNCfile = outputDir + "/" + outputNamePrefix + ".bam"