modified watch_folder