public void DeleteFromFileStructure(Boolean isDirectory, String name) {
            String lineToDelete;
            if (isDirectory) {
                lineToDelete = "DIRECTORY " + name;
            } else {
                lineToDelete = "FILE " + name;
            }
            File file = new File("SYSTEM_LOG.txt");
            if (!file.exists() || !file.isFile()) {
                System.out.println("Unable to delete from TFS file structure");
                return;
            }
            try {
                File tempFile = new File(file.getAbsolutePath() + ".tmp");
                BufferedReader br = new BufferedReader(new FileReader(file));
                PrintWriter pw = new PrintWriter(new FileWriter(tempFile));

                String line;
                while ((line = br.readLine()) != null) {
                    if (!line.trim().equals(lineToDelete)) {
                        pw.println(line);
                        pw.flush();
                    }
                }
                pw.close();
                br.close();
                if (!file.delete()) {
                    System.out.println("Could not delete file");
                    return;
                }
                if (!tempFile.renameTo(file)) {
                    System.out.println("Could not rename file");
                }
            } catch (IOException ie) {
                System.out.println("Failed to delete file from the TFS file structure");
            }
        }