repair writeModule