Switch pyyaml dump use to safe_dump