start to check files in the directory