
    UNITED STATES of America, Plaintiff—Appellee, v. Keith Ramsey BARNHART, Defendant—Appellant.
    No. 05-4938.
    United States Court of Appeals, Fourth Circuit.
    Submitted: July 31, 2006.
    Decided: Sept. 6, 2006.
    
      Marshall A. Swann, Charlotte, North Carolina, for Appellant. Amy Elizabeth Ray, Office of the United States Attorney, Asheville, North Carolina, for Appellee.
    Before WILKINSON, NIEMEYER, and WILLIAMS, Circuit Judges.
    Affirmed by unpublished PER CURIAM opinion.
    Unpublished opinions are not binding precedent in this circuit. See Local Rule 36(c).
   PER CURIAM:

Keith Ramsey Barnhart pled guilty to possession of a firearm during and in relation to a drug trafficking offense, 18 U.S.C. § 924(c)(1)(A)(I) (2000) (Count Two), and possession of a firearm by a person previously convicted of a felony, 18 U.S.C. §§ 922(g)(1), 924(a)(2) (2000) (Count Three). The district court sentenced Barnhart to 222 months’ imprisonment, consisting of a 102-month sentence on the § 924(c) offense, and a consecutive 120-month term on the § 922(g) offense.

Barnhart’s attorney filed an Anders brief, arguing that Barnhart is entitled to specific performance by the Government of its agreement to make a motion for downward departure. Barnhart signed a plea agreement containing the following provisions:

23. When and if the defendant assists the government as described above:
a. The United States, in its sole discretion, will determine whether said assistance has been substantial.
b. Upon a determination that the defendant has rendered substantial assistance, the government may make a motion pursuant to U.S.S.G. § 5K1.1 for imposition of a sentence below the applicable Sentencing Guidelines. The United States may also, within its sole discretion, move the Court pursuant to 18 U.S.C. § 3553(e) to impose a sentence below any applicable statutory mandatory minimum.
24. The defendant understands that if he ... violates any federal, state, or local law, or any order of any court, including any condition of pre-trial or pre-sentence, or post-sentence release, the United States will be relieved of its obligation under this Plea Agreement, but the defendant will not be allowed to withdraw his guilty plea.

First, we note that the plea agreement unambiguously provides that the decision whether to file a departure motion was within the Government’s discretion, and Barnhart does not allege that the refusal to so move was based on an improper motive, such as racial or religious animus. See United States v. Butler, 272 F.3d 683, 686-88 (4th Cir.2001). Moreover, after he signed the plea agreement, Barnhart tested positive for illegal drugs, freeing the Government from any obligation it had under the plea agreement. Thus, the issue is without merit.

In his pro se supplemental brief, Barnhart asserts that his guilty plea was not voluntary because during the plea hearing, he was led to believe his sentences for the § 922(g) offense and the § 924(c) offense would run concurrently. As Barnhart suggests, the magistrate judge appeared to accede to counsel’s suggestion that the sentences would be concurrent, when, by statute, the sentence on the § 924(c) count was required to run consecutively to any other sentence imposed. See 18 U.S.C. § 924(c)(1)(D)(ii).

Because Barnhart did not object or seek to withdraw his guilty plea on the basis of this error, this court’s review is for plain error. United States v. Martinez, 277 F.3d 517, 527 (4th Cir.2002). Under plain error review, this court may notice an error that was not preserved by timely objection only if the defendant can demonstrate that: (1) there was error; (2) it was plain; and (3) the error affected the defendant’s substantial rights. United States v. Olano, 507 U.S. 725, 732-34, 113 S.Ct. 1770, 123 L.Ed.2d 508 (1993). Even when these three conditions are satisfied, this court may exercise its discretion to notice the error only if the error “seriously affect[s] the fairness, integrity or public reputation of judicial proceedings.” Id. at 736, 113 S.Ct. 1770 (internal quotation marks omitted).

We conclude that the error here did not rise to the level of reversible “plain error” because it did not impact Barnhart’s substantial rights. An error is substantial if it was so prejudicial as to affect the outcome of the proceedings. Id.; Martinez, 277 F.3d at 532. In the guilty plea context, to prove that an error is substantial, the defendant must show that, but for the error, he would not have pled guilty. Martinez, 277 F.3d at 532. Barnhart signed a plea agreement that stated with regard to each count that the sentence would be consecutive to any other sentence. Both the magistrate judge and the plea agreement also stated that the maximum penalty for Count Two was life imprisonment, which is far below the sentence Barnhart ultimately received. Any confusion that may have resulted from the misstatement in the Rule 11 hearing did not prejudice Barn-hart.

Barnhart next claims his counsel was ineffective for failing to investigate his mental health before advising him to plead guilty, and he states that he was taking several prescription drugs at the time of the offense and guilty plea hearing. Generally, claims of ineffective assistance of counsel are not cognizable on direct appeal. To allow for adequate development of a record, a defendant must bring his claim in a 28 U.S.C. § 2255 (2000) motion, unless the record conclusively establishes ineffective assistance. United States v. Richardson, 195 F.3d 192, 198 (4th Cir. 1999); United States v. King, 119 F.3d 290, 295 (4th Cir.1997). Because the present record does not conclusively establish ineffective assistance of counsel, Barn-hart’s claim is not cognizable on direct appeal.

Barnhart also claims that he should not have been convicted of the § 924(c) offense when he did not plead guilty to the underlying drug offense. However, “a defendant’s conviction under § 924(c) ‘does not depend on his being convicted — either previously or contemporaneously — of the predicate offense, as long as all of the elements of that offense are proved and found beyond a reasonable doubt.’ ” United States v. Hopkins, 310 F.3d 145, 152 (4th Cir.2002) (quoting United States v. Crump, 120 F.3d 462, 466 (4th Cir.1997)). Barnhart’s guilty plea to the § 924(c) offense constituted an admission of all material elements of the crime. See McCarthy v. United States, 394 U.S. 459, 466-67, 89 S.Ct. 1166, 22 L.Ed.2d 418 (1969); United States v. Willis, 992 F.2d 489, 490 (4th Cir.1993) (“A knowing, voluntary, and intelligent guilty plea to an offense conclusively establishes the elements of the offense and the material facts necessary to support the conviction.”). Thus, Barnhart has failed to establish plain error in the taking of his plea.

Similarly, Barnhart challenges the factual basis for his guilty plea to Count Two. Specifically, he argues that he did not actively use a firearm in furtherance of drug trafficking under Bailey v. United States, 516 U.S. 137, 116 S.Ct. 501, 133 L.Ed.2d 472 (1995). Again, because Barnhart voluntarily entered a guilty plea, his claims are waived. Willis, 992 F.2d at 490.

Pursuant to Anders, we have examined the entire record and find no meritorious issues for appeal. Accordingly, we affirm the judgment of the district court. This court requires that counsel inform his client, in writing, of his right to petition the Supreme Court of the United States for further review. If the client requests that a petition be filed, but counsel believes that such a petition would be frivolous, then counsel may move this court for leave to withdraw from representation. Counsel’s motion must state that a copy thereof was served on the client. We dispense with oral argument because the facts and legal contentions are adequately presented in the materials before the court and argument would not aid the decision process.

AFFIRMED. 
      
      . Anders v. California, 386 U.S. 738, 87 S.Ct. 1396, 18 L.Ed.2d 493 (1967).
     
      
      . Barnhart’s attorney also argues that the waiver in the plea agreement does not preclude his appeal that the Government breached its agreement to file a substantial assistance motion. Because the Government has not relied on the waiver provision to assert that appellate review is precluded, the argument raised by Barnhart’s counsel need not be addressed. See United States v. Blick, 408 F.3d 162, 168 (4th Cir.2005) (citing United States v. Brock, 211 F.3d 88, 90 n. 1 (4th Cir.2000)).
     
      
      . The plea hearing was conducted by the magistrate judge with Barnhart’s consent. See United States v. Osborne, 345 F.3d 281, 288 (4th Cir.2003).
     
      
      . We note that in all other respects, the magistrate judge properly advised Barnhart and informed him of the charges against him, the rights he was foregoing by pleading guilty, and the penalties for the offenses.
     