Properly load raw YAML for checking difference.
Improve YAML writing.