read_spec function

Read yaml spec file