saving/loading machine to YAML