fix error message unless PyYAML is installed