How to make sure that the data filled stays even if the connection drops?