restructure check for empty directory