updating obsolete usage of YamlSerializer