Corrected write method signature.