Fix deserialization; make file writing/reading successful