modification find in thread https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482061 of closedir() attempted on invalid dirhandle DIR