Better exception management for yaml provider