corrected bug not counting file in folder and checking if a folder is present he is not empty