Changes to output to screen instead of to file

Hi, I changed your code a bit to return pure yaml and output to screen.  Whaddya think?