read works, write does not