[DEBUG] error writing