add example about serializing data in file