New: Added logic to find the files in the given directory