checking directory for files instead