Remove duplication of yaml file read