pub async fn write( path: impl AsRef<Path>, contents: impl AsRef<[u8]>, message: Option<impl AsRef<str>>, ) -> Result<(), Error>
Write to file with logging