diff --git a/pyani/scripts/logger.py b/pyani/scripts/logger.py
index <HASH>..<HASH> 100644
--- a/pyani/scripts/logger.py
+++ b/pyani/scripts/logger.py
@@ -60,9 +60,11 @@ def build_logger(name, args):
 
     # If a logfile was specified, use it
     if args.logfile is not None:
+        logdir = os.path.split(args.logfile)[:-1]
         try:
-            os.makedirs(os.path.join(*os.path.split(args.logfile)[:-1]),
-                        exist_ok=True)
+            if len(logdir):
+                os.makedirs(os.path.join(*os.path.split(args.logfile)[:-1]),
+                            exist_ok=True)
             logstream = open(args.logfile, 'w')
         except OSError:
             logger.error('Could not open %s for logging', args.logfile)
create dir for logfile only if not writing to curdir