improve line-continuation handling in YAML; guard against exceptions