Mostly working write support. Crashes on large (>8192 byte) writes.