added sorting sub dir and first file