improve YAML loading