fn get_writer(path: &str) -> Result<Box<dyn Write>>
Helper function to get writer from file path (or stdout if “-”)