pub(crate) fn write_to_output_file(output: PathBuf, data: &[u8]) -> Result<()>
Write a data to a file given an output path.