use yaml.dump when yaml.safe_dump raises RepresenterError (eg. dump some kind of object)