A short write in lua can induce a long write and assert