public void deleteFile(){
        // remove the file that is being used by this class
        close(); // remove the streams
        
        if (file.delete()){
            log.writeLn("File " + file.getAbsolutePath() + " was deleted.");
        } else {
            log.writeLn("File could not be deleted. \nFile: " + file.getAbsolutePath());
        }
    }