Enforce paddedLength in write()