cw.lua.in: deal with read error