public void changeFile(String newFileName) { currentFile = newFileName; // Update the FileSystemWatcher properties updateProperties(); }