Make use of PyYAML optional (review feedback)