pub fn write_attempt_record( root: &Path, request: &str, record: &AttemptRecord, ) -> Result<(), String>