Add more error control when Swagger YAML has wrong format or file not found. Thanks to @arcenik