Check directory for files and do something with them