diff --git a/sources/MEDLEYDIR b/sources/MEDLEYDIR
index 1c702062..b263e293 100644
--- a/sources/MEDLEYDIR
+++ b/sources/MEDLEYDIR
@@ -1,10 +1,10 @@
 (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
 
-(FILECREATED "18-Feb-2022 12:46:00" {DSK}<home>larry>medley>sources>MEDLEYDIR.;2 6060   
+(FILECREATED " 5-Mar-2022 12:43:54" {DSK}<home>larry>medley>sources>MEDLEYDIR.;2 6280   
 
-      :CHANGES-TO (VARS MEDLEY-INIT-VARS)
+      :CHANGES-TO (FNS MEDLEYDIR)
 
-      :PREVIOUS-DATE "13-Feb-2022 15:20:26" {DSK}<home>larry>medley>sources>MEDLEYDIR.;1)
+      :PREVIOUS-DATE "18-Feb-2022 12:46:00" {DSK}<home>larry>medley>sources>MEDLEYDIR.;1)
 
 
 (PRETTYCOMPRINT MEDLEYDIRCOMS)
@@ -62,33 +62,38 @@
             NIL])
 
 (MEDLEYDIR
-  [LAMBDA (DIRNAME FILENAME OUTPUT NOERROR)                  (* ; 
-                                                           "Edited  2-Dec-2021 20:23 by kaplan")
+  [LAMBDA (DIRNAME FILENAME OUTPUT NOERROR)                (* ; "Edited  5-Mar-2022 12:43 by larry")
+                                                          (* ; "Edited  2-Dec-2021 20:23 by kaplan")
+    (DECLARE (GLOBALVARS MEDLEYDIR))
     (DECLARE (GLOBALVARS MEDLEYDIR))
     (if (NULL DIRNAME)
         then (if (OR (NOT (BOUNDP 'MEDLEYDIR))
-                             (NOT MEDLEYDIR))
-                     then (OR (SETQ MEDLEYDIR (DIRECTORYNAME (OR (UNIX-GETENV "MEDLEYDIR")
-                                                                     T)))
-                                  (DIRECTORYNAME T))
-                   elseif (STRPOS "/" MEDLEYDIR)
-                     then (SETQ MEDLEYDIR (DIRECTORYNAME MEDLEYDIR))
-                   else MEDLEYDIR)
+                     (NOT MEDLEYDIR))
+                 then (OR (SETQ MEDLEYDIR (DIRECTORYNAME (OR (UNIX-GETENV "MEDLEYDIR")
+                                                             T)))
+                          (DIRECTORYNAME T))
+               elseif (STRPOS "/" MEDLEYDIR)
+                 then (SETQ MEDLEYDIR (DIRECTORYNAME MEDLEYDIR))
+               else MEDLEYDIR)
       elseif (LISTP DIRNAME)
-        then (for X Y in DIRNAME when (SETQ Y (MEDLEYDIR X FILENAME OUTPUT 
-                                                                     NOERROR)) collect Y)
+        then (for X Y in DIRNAME when (SETQ Y (MEDLEYDIR X FILENAME OUTPUT NOERROR)) collect Y)
       elseif FILENAME
-        then (SETQ FILENAME (CONCAT (MEDLEYDIR DIRNAME)
-                                       FILENAME))
-              (if OUTPUT
-                  then FILENAME
-                else (OR NOERROR (INFILEP FILENAME)
-                             (ERROR "No such medley file" FILENAME)))
+        then [if (NULL (SETQ DIRNAME (MEDLEYDIR DIRNAME NIL OUTPUT NOERROR)))
+                 then (OR NOERROR (SHOULDNT))
+                      NIL
+               else (SETQ FILENAME (CONCAT DIRNAME FILENAME))
+                    (if OUTPUT
+                        then FILENAME
+                      else (OR (INFILEP FILENAME)
+                               (if NOERROR
+                                   then NIL
+                                 else (ERROR "No such medley file" FILENAME]
       else (OR (DIRECTORYNAME (CONCAT (MEDLEYDIR)
-                                         DIRNAME ">"))
-                   (if NOERROR
-                       then NIL
-                     else (ERROR "No such medley directory" DIRNAME])
+                                     DIRNAME ">")
+                      NIL OUTPUT)
+               (if NOERROR
+                   then NIL
+                 else (ERROR "No such medley directory" DIRNAME])
 )
 
 (RPAQ? MEDLEYDIR )
@@ -125,5 +130,5 @@
 (ADDTOVAR GLOBALVARS MEDLEYDIR MEDLEY-INIT-VARS)
 )
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (1383 4565 (MEDLEY-INIT-VARS 1393 . 3007) (MEDLEYDIR 3009 . 4563)))))
+  (FILEMAP (NIL (1375 4785 (MEDLEY-INIT-VARS 1385 . 2999) (MEDLEYDIR 3001 . 4783)))))
 STOP
diff --git a/sources/MEDLEYDIR.LCOM b/sources/MEDLEYDIR.LCOM
index 4ff1e512..06cddd43 100644
Binary files a/sources/MEDLEYDIR.LCOM and b/sources/MEDLEYDIR.LCOM differ
