diff --git a/gridtk/sge.py b/gridtk/sge.py
index <HASH>..<HASH> 100644
--- a/gridtk/sge.py
+++ b/gridtk/sge.py
@@ -11,7 +11,7 @@ from __future__ import print_function
 from .manager import JobManager
 from .setshell import environ
 from .models import add_job, Job
-from .tools import logger, qsub, qstat, qdel, make_shell
+from .tools import logger, qsub, qstat, qdel, make_shell, makedirs_safe
 
 import os, sys
 
@@ -58,6 +58,10 @@ class JobManagerSGE(JobManager):
     dependent_jobs = self.get_jobs(dependencies)
     deps = sorted(list(set([j.id for j in dependent_jobs])))
 
+    # make sure log directory is created and is a directory
+    makedirs_safe(job.log_dir)
+    assert os.path.isdir(job.log_dir), 'Please make sure --log-dir either does not exist or is a directory.'
+
     # generate call to the wrapper script
     command = make_shell(python, [jman, '-d%s' % ('v'*verbosity), self._database, 'run-job'])
     q_array = "%d-%d:%d" % array if array else None
make sure log_dir is directory is a directory