show deprecation warning for .write()

and actually deprecate `.write()`