forgot to pass up "bytes_written" to the caller.