public void writeToFile(String content) {
        try {
            Date dte = new Date();
            SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yy_HH-mm");
            File file = new File("D:/ALL.csv");

            // if file doesnt exists, then create it
            /*if (!file.exists()) {
             file.createNewFile();
             }*/
            FileWriter fw = new FileWriter(file.getAbsoluteFile());
            BufferedWriter bw = new BufferedWriter(fw);
            bw.write(content);
            bw.close();
            

        } catch (IOException e) {
            Logger.getLogger(CallmanagerCDR.class.getName()).log(Level.SEVERE, null, e);
        }   
    }