fn write_config_file(config_file: &Path, cmd: &RunCommand) -> Result<(), String>