handle missing directories case
handle missing directories case