Add missing parameter in handleWriteError call