error in decode_write