Writer writes to the specified file or stdout, according to the options specified in opts
Writer
opts