
    UNITED STATES of America, Plaintiff-Appellee, v. John D. HAYES, Defendant-Appellant.
    No. 14-4658.
    United States Court of Appeals, Fourth Circuit.
    Submitted: April 30, 2015.
    Decided: May 22, 2015.
    
      Brian J. Kornbrath, Acting Federal Public Defender, David R. Bungard, Assistant Federal Public Defender, Jonathan D. Byrne, Appellate Counsel, Charleston, West Virginia, for Appellant. R. Booth Goodwin II, United States Attorney, Jennifer Rada Herrald, Assistant United States Attorney, Charleston, West Virginia, for Appellee.
    Before SHEDD, FLOYD, and THACKER, Circuit Judges.
   Affirmed by unpublished PER CURIAM opinion.

Unpublished opinions are not binding precedent in this circuit.

PER CURIAM:

Following a bench trial, John D. Hayes was convicted of attempted distribution and possession of child pornography, in violation of 18 U.S.C. § 2252A(a)(2), (5)(B) (2012). The district court sentenced Hayes to 180 months in prison. Hayes appeals his convictions and sentence. Finding no error, we affirm.

Hayes contends that the district court erred in rejecting his guilty plea to possession of child pornography. “Before a court may enter judgment on a plea of guilty, it must find a sufficient factual basis to support the plea.” United States v. Mitchell, 104 F.3d 649, 652 (4th Cir.1997); see Fed. R.Crim.P. 11(b)(3). The factual basis requirement “ensures that the court make clear exactly what a defendant admits to, and whether those admissions are factually sufficient to constitute the alleged crime.” United States v. DeFusco, 949 F.2d 114, 120 (4th Cir.1991).. “The trial court has wide discretion in determining whether a factual basis exists,” United States v. Morrow, 914 F.2d 608, 611 (4th Cir.1990), and the court may make that determination “by having the accused describe the conduct that gave rise to the charge,” Santobello v. New York, 404 U.S. 257, 261, 92 S.Ct. 495, 30 L.Ed.2d 427 (1971).

To prove possession of child pornography, the Government must show that the defendant knowingly possessed images of child pornography. 18 U.S.C. § 2252A(a) (5). An act is knowing if it is done “voluntarily and intentionally and not because of mistake or accident or other innocent reason.” United States v. Shrader, 675 F.3d 300, 309 (4th Cir.2012) (internal quotation marks omitted). “A possessor of child pornography videos need not know that it is such at the time of download, so long as he discovers that it is child pornography after the download and decides to keep it anyway.” United States v. Carani, 492 F.3d 867, 875 (7th Cir.2007).

In this case, the court exercised its discretion to reject the guilty plea because it concluded that Hayes refused to admit to the core conduct of the offense, thus raising questions about the factúal basis for the plea. In light of Hayes’ testimony at the plea hearing and the “deference [that we must accord] to the trial court’s decision as to how best to conduct the mandated colloquy with the defendant,” DeFusco, 949 F.2d at 116, we cannot conclude that the court erred in this respect.

' Hayes next asserts a Confrontation Clause challenge to the admission of reports indicating that he was sharing child pornography over a peer-to-peer network. The reports were generated automatically by a computer program, not by a person. “Evidence implicates the Confrontation Clause only if it constitutes a testimonial statement — that is, a statement made with a primary purpose of creating an out-of-court substitute for trial testimony.” United States v. Reed, 780 F.3d 260, 269 (4th Cir.2015) (internal quotation marks omitted). Data generated by a machine, where the only source of the statement is the machine printout and not a person, is not subject to the Confrontation Clause. United States v. Washington, 498 F.3d 225, 229-30 (4th Cir.2007); see also United States v. Lamons, 532 F.3d 1251, 1264 (11th Cir.2008) (statements made by machines and not by humans are exempt from purview of Confrontation Clause). We conclude that the admission of the challenged reports did not violate the Confrontation Clause.

Hayes next challenges the sufficiency of the evidence supporting his conviction for the attempted distribution of child pornography. We review the sufficiency of the evidence underlying a criminal conviction “by determining whether there is substantial evidence in the record, when viewed in the light most favorable to the government, to support the conviction.” United States v. Jaensch, 665 F.3d 83, 93 (4th Cir.2011) (internal quotation marks omitted). In evaluating the sufficiency of the evidence, we do not review the credibility of the witnesses, and we assume that the factfinder resolved all contradictions in the testimony in favor of the Government. United States v. Foster, 507 F.3d 233, 245 (4th Cir.2007). We will not overturn a verdict if “any rational trier of fact could have found the essential elements of the crime beyond a reasonable doubt.” United States v. Dinkins, 691 F.3d 358, 387 (4th Cir.2012) (internal quotation marks and emphasis omitted).

The evidence established that Hayes possessed substantial knowledge about computers and knowingly used a file-sharing program that allowed others to access child pornography files stored in his shared folder. We conclude that the evidence was sufficient to support Hayes’ conviction for attempted distribution. See United States v. Collins, 642 F.3d 654, 656-57 (8th Cir.2011) (finding sufficient evidence of attempted distribution of child pornography where defendant downloaded, installed, and used filersharing program and possessed knowledge of computers); see also United States v. Dunn, 777 F.3d 1171, 1175 (10th Cir.2015) (defendant’s placement of child pornography files into shared folder accessible to other users was sufficient to establish distribution even without active transfer of possession to another user).

Finally, Hayes claims that his sentence of 15 years was unconstitutional because the indictment did not allege the existence of a prior conviction. As Hayes acknowledges, his claim is foreclosed by Supreme Court precedent as well as our own and is thus unavailing. See Almendarez-Torres v. United States, 523 U.S. 224, 233-36, 243-44, 118 S.Ct. 1219, 140 L.Ed.2d 350 (1998); United States v. Cheek, 415 F.3d 349, 351-54 (4th Cir.2005) (reaffirming continued validity of Almendarez-Torres following United States v. Booker, 543 U.S. 220, 125 S.Ct. 738, 160 L.Ed.2d 621 (2005)).

Accordingly, we affirm the district court’s judgment. We dispense with oral argument because the facts and legal contentions are adequately presented in the materials before this court and argument would not aid the decisional process.

AFFIRMED. 
      
       Hayes was previously convicted in West Virginia of sexual assault in the second degree, involving a minor, which subjects him to a mandatory minimum sentence of 15 years’ imprisonment and a maximum possible sentence of 40 years. See 18 U.S.C. § 2252A(b)(l) (2012).
     