REORG AND FINISH (OF I/O)

- deleted redundant buffer from general structure
- adapted read and write to this change
- fclose finally finished