Character file serialization/deserialization