still to be done:

* read several times or write several times if an error occurs
* make a backup when writing data, so if something fails ...
