How to write a file then read it knowing that I have to write it first because file does not exist when,I use the option \'r+\' but I got the error file doe