update serialization example to actually read/write to/from a file