ENH [dist] make output file optional and stdout a default selection