Fixed #1161 PluginAPI::readYAML() and PluginAPI::writeYAML()