changed read and write function

- changed write function
- changed read function
- buffer sends data to kernal log