fixed the folder checking section