Changed so that the update function will run automatically if there are files in the directory.