decreaded number of file stats(). added directory and file filtering