add a way to get print-roots-only output to be dumped to a file