Refactor HANDLE_CASE(write()) to swrite

swrite means safe write.
Merge branch 'my-rpi' into laptop