Actually you can't write this class to file like this. Storing the address of the string in title doesn't help you retrieve the string value.