catch empty directories