Added a failOnUnknown flag