Added WatchDir.java class and modified functions