basic writeDataInFile done