Add catch clause for YAMLException, apparently it does not extend IOException like you'd expect.