empty yaml should not cause Error
do not write empty yaml as '[]', to allow simple appending to file
code style: comments
code style line length
fix bad scmtype
code style error to stderr