error at write()