diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala
index 9913254953607dd1542b70ebbf49d2a2dacdd429..12a36ad800a36d78d0237cc1358a1891e3a66675 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/Raxml.scala
@@ -48,7 +48,7 @@ class Raxml(val root: Configurable) extends BiopetCommandLineFunction {
   var f: String = "d"
 
   @Argument(doc = "Output directory", required = true)
-  var w: String = _
+  var w: File = null
 
   var noBfgs: Boolean = config("no_bfgs", default = false)
 
@@ -65,6 +65,7 @@ class Raxml(val root: Configurable) extends BiopetCommandLineFunction {
   var executableThreads: Option[String] = config("exe_pthreads")
 
   override def beforeGraph {
+    require(w != null)
     if (threads == 0) threads = getThreads(defaultThreads)
     executable = if (threads > 1 && executableThreads.isDefined) executableThreads.get else executableNonThreads
     super.beforeGraph
@@ -73,24 +74,24 @@ class Raxml(val root: Configurable) extends BiopetCommandLineFunction {
       case "d" if b.isEmpty => {
         out +:= getBestTreeFile
         for (t <- 0 until N.getOrElse(1)) {
-          out +:= new File(w + File.separator + "RAxML_log." + n + ".RUN." + t)
-          out +:= new File(w + File.separator + "RAxML_parsimonyTree." + n + ".RUN." + t)
-          out +:= new File(w + File.separator + "RAxML_result." + n + ".RUN." + t)
+          out +:= new File(w, "RAxML_log." + n + ".RUN." + t)
+          out +:= new File(w, "RAxML_parsimonyTree." + n + ".RUN." + t)
+          out +:= new File(w, "RAxML_result." + n + ".RUN." + t)
         }
       }
       case "d" if b.isDefined => out +:= getBootstrapFile
       case "b" => {
-        out +:= new File(w + File.separator + "RAxML_bipartitionsBranchLabels." + n)
-        out +:= new File(w + File.separator + "RAxML_bipartitions." + n)
+        out +:= new File(w, "RAxML_bipartitionsBranchLabels." + n)
+        out +:= new File(w, "RAxML_bipartitions." + n)
       }
       case _ =>
     }
   }
 
-  def getBestTreeFile: File = new File(w + File.separator + "RAxML_bestTree." + n)
-  def getBootstrapFile: File = new File(w + File.separator + "RAxML_bootstrap." + n)
-  def getBipartitionsFile: File = new File(w + File.separator + "RAxML_bipartitions." + n)
-  def getInfoFile: File = new File(w + File.separator + "RAxML_info." + n)
+  def getBestTreeFile: File = new File(w, "RAxML_bestTree." + n)
+  def getBootstrapFile: File = new File(w, "RAxML_bootstrap." + n)
+  def getBipartitionsFile: File = new File(w, "RAxML_bipartitions." + n)
+  def getInfoFile: File = new File(w, "RAxML_info." + n)
 
   def cmdLine = required(executable) +
     required("-m", m) +
@@ -103,6 +104,6 @@ class Raxml(val root: Configurable) extends BiopetCommandLineFunction {
     optional("-f", f) +
     optional("-t", t) +
     optional("-z", z) +
-    conditional(noBfgs, "--no-bgfs") +
+    conditional(noBfgs, "--no-bfgs") +
     required("-T", threads)
 }
diff --git a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala
index a041f5dc760543bc0377edc5678299c81ec042c2..454572dab193e18d10056a516d41555e75bc87f6 100644
--- a/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala
+++ b/public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/extensions/RunGubbins.scala
@@ -33,7 +33,7 @@ class RunGubbins(val root: Configurable) extends BiopetCommandLineFunction {
   var outputFiles: List[File] = Nil
 
   @Argument(required = true)
-  var outputDirectory: String = _
+  var outputDirectory: File = null
 
   executable = config("exe", default = "run_gubbins.py")
   var outgroup: Option[String] = config("outgroup")
@@ -49,7 +49,8 @@ class RunGubbins(val root: Configurable) extends BiopetCommandLineFunction {
 
   override def beforeGraph: Unit = {
     super.beforeGraph
-    jobLocalDir = new File(outputDirectory)
+    require(outputDirectory != null)
+    jobLocalDir = outputDirectory
     if (prefix.isEmpty) prefix = Some(fastafile.getName)
     val out: List[String] = List(".recombination_predictions.embl",
       ".recombination_predictions.gff",