The opinion of the court was delivered by
DREIER, P.J.A.D.Defendant Joseph N. Sasso appeals from a summary judgment striking defendant’s defenses in this mortgage foreclosure proceeding. Plaintiff, Sun NLF Limited Partnership, is the assignee of the Resolution Trust Corporation (RTC), which took over the assets of Prospect Park Savings & Loan Association. Prospect Park had loaned Sasso various sums to construct Phase I of a development known as Sun Rise at Marcella. Sasso had borrowed 1.5 million dollars to finance the development, and a year and one-half later the fifteen lots constituting Phase I of the project were sold to Prospect Development Corporation (PDC), a wholly-owned subsidiary of the bank, for 2.4 million dollars. As a result of the transaction, Sasso paid his loan down to $430,000 and executed a new note and mortgage modification agreement to reflect this reduction.
Sasso then negotiated with PDC for the purchase of Phase II of the project, consisting of fourteen lots. The negotiations on the part of the bank were handled by Russell Frignoca, who was president and chairman of the board of both the bank and PDC. This agreement, executed in September 1989, was signed by Frignoca and required PDC to purchase Phase II of the develop*549ment for 1.8 million dollars, with the closing to be held after the final subdivision approval. The letter agreement was approved by the PDC board of directors and was maintained as an official record. Furthermore, the bank allegedly was aware of the letter and also maintained the information concerning the promised buyout in its official files.
In reliance on the agreement, Sasso borrowed an additional $170,000 to complete the site work, and a new note and mortgage modification agreement was executed increasing the principal balance to $600,000 and extending the maturity date of the note. Defendant reduced the principal to $540,000 in October 1990, and again, a new note and a new modification agreement was executed. Neither modification referred to the September 1989 contract between defendant and PDC.
When the site approvals were completed, defendant demanded that the bank close on Phase II, but Frignoca would not respond to defendant’s request. A few months later the bank went into receivership and was taken over by the RTC, which later assigned this note and mortgage together with many others to plaintiff.
Defendant concedes the validity of the note and mortgage. The balance due on the note is now $688,229.80, plus interest from November 30, 1996, and counsel fees. Defendant attempted to raise the agreement by the bank’s subsidiary as a defense to this foreclosure, but the defense was stricken as non-germane, and as barred by federal and state law. Because defendant raised sufficient material factual issues with respect to plaintiffs claim that federal law bars the counterclaims, we reverse and remand for a hearing on those issues.
I.
The motion judge held that defendant’s counterclaims and defenses were barred by state law because (1) plaintiff was a holder in due course, and (2) the claims and defenses were not properly assertable in a foreclosure action. Defendant contends that plaintiff cannot be a holder in due course under state law because the *550note and mortgage were overdue when plaintiff acquired them, and plaintiff had actual or constructive notice of defendant’s defenses and counterclaims.
Plaintiff now concedes that it is not a holder in due course under state law (“It was clearly incorrect for the chancery court to base its decision upon state law”). Plaintiffs concession is appropriate. To be a holder in due course, the holder must take the instrument
for value, in good faith, without notice that the instrument is overdue or has been dishonored or that there is an uncured default with respect to payment of another instrument issued as part of the same series, without notice that the instrument contains an unauthorized signature or has been altered, without notice of any claim to the instrument as described in [W./.S.A] 12A:3-306, and without notice that any party has a defense or claim in recoupment described in subsection a. of [W./.S.A] 12A:3-305.
[N.J.S.A. 12A:3 — 302(a)(2).]
In this case, the face of the instrument disclosed that it was overdue when plaintiff acquired it; the latest note was due on December 31, 1992, prior to plaintiffs acquisition of the note in August 1993. Plaintiffs contention that it is a holder in due course under federal law will be addressed infra.
II.
The judge further ruled that defendant’s fraud and breach of contract claims and defenses would also be barred under state law because they were non-germane counterclaims. He relied on the proposition that the only issues in a foreclosure action are the validity of the mortgage, the amount of the indebtedness, and the right of the mortgagee to resort to the mortgaged premises. In support of his ruling that non-germane counterclaims cannot be asserted in a foreclosure action, the judge cited Great Falls Bank v. Pardo, 263 N.J.Super. 388, 394, 622 A.2d 1353 (Ch.Div.1993), aff'd, 273 N.J.Super. 542, 642 A.2d 1037 (App.Div.1994), and R. 4:64-5. While the cited law was correct, the application to these facts was not. Had the foreclosure action been brought by the bank itself, the claims and defenses arising out of the breach of the September contract would have been properly before the *551court. See Leisure Technology-Northeast, Inc. v. Klingbeil, 137 N.J.Super. 353, 358, 349 A.2d 96 (App.Div.1975) (defense to foreclosure based on mortgagee’s breach of contract relating to the development of the property is a “germane” counterclaim). Indeed, under the entire controversy doctrine, failure to raise the defenses and counterclaims in the foreclosure action very well might have barred assertion of those claims and defenses in a subsequent action. See Joan Ryno, Inc. v. First Nat’l. Bank, 208 N.J.Super. 562, 506 A.2d 762 (App.Div.1986). There we stated:
Without doubt a defendant in a foreclosure action may challenge plaintiffs right to foreclose. See Central Penn Nat’l Bank v. Stonebridge Ltd., 185 N.J.Super. 289, 302 [448 A.2d 498] (Ch.Div.1982). We think it clear that any conduct of a mortgagee known to the mortgagor prior to the institution of a foreclosure that could be the basis of an independent action for damages by reason of the mortgagee having brought the foreclosure could be raised as an equitable defense in the foreclosure. See Leisure Technology v. Klingbeil, 137 N.J.Super. 353, 356 [349 A.2d 96] (App.Div.1975).
[Id. at 570, 506 A.2d 762.]
In the present case, the bank’s breach of its written promise to purchase the mortgaged property for a sum far in excess of the amount of the mortgage would have been a valid defense to foreclosure. As a general rule, the FDIC (or RTC) steps into the shoes of an insolvent thrift, “to work out its claims under state law,” except where federal law provides the FDIC with a special defense. O’Melveny & Myers v. FDIC, 512 U.S. 79, 86, 114 S.Ct. 2048, 2054, 129 L.Ed.2d 67, 75 (1994). In other words, the RTC, FDIC or their assignees, like plaintiff, are subject to the claims and defenses that the mortgagor had against the bank, absent some federal law barring those defenses.
III.
We now examine the subject order, applying federal law. The judge held that the September 1989 letter agreement could provide no defense because the agreement and subsequent notes failed to incorporate or even cross-reference each other. According to defendant, the judge misconstrued the requirements of D’Oench, Duhme & Co. v. FDIC, 315 U.S. 447, 62 S.Ct. 676, 86 L. *552Ed. 956 (1942) and 12 U.S.C.A § 1823(e). He asserts that under the authority cited by the judge, the agreement relied upon by the borrower either can be contained in the note itself or be filed by the bank in its official records. Plaintiff, on the other hand, contends that there must be some relevant writing in the loan documents expressly conditioning the borrower’s promise to pay the note upon the bank’s performance of other obligations. Otherwise, defendant argues, federal banking authorities would be unable to evaluate a bank’s assets accurately.
In the D’Oench, Duhme case itself, the maker of a note entered into a written side agreement with the bank that the note would not be paid, the purpose of which was to enable the bank to appear fiscally healthier than it really was. The Court held that the side agreement was not enforceable against the FDIC because it diminished what would appear to banking regulators to be a valid bank asset. The Court perceived in federal banking statutes a policy to protect the FDIC “and the public funds which it administers against misrepresentations as to the securities or other assets in the portfolios of the banks which [the FDIC] insures or to which it makes loans.” 315 U.S. at 457, 62 S.Ct. at 679, 86 L. Ed. at 962.
The case “created a federal common law doctrine of estoppel to protect the FDIC from defenses raised by debtors based on ‘secret agreements’ with failed banks.” Motorcity of Jacksonville, Ltd. v. Southeast Bank, 83 F.3d 1317, 1324 (11th Cir.1996), vacated and remanded sub nom. Hess v. FDIC, — U.S. -, 117 S.Ct. 760, 136 L.Ed.2d 708, reaff'd on remand, 120 F.3d 1140 (11th Cir.), cert. denied, — U.S. -, 118 S.Ct. 1559, 140 L.Ed.2d 791 (1998). See also J. Michael Echevarria, A Precedent Embalms a Principle: The Expansion of the D’Oench, Duhme Doctrine, 43 Cath. U.L.Rev., 745, 757-59 (1994) (emphasizing roots of the D’Oench Duhme doctrine in equitable principle of estoppel).
In 1950, Congress codified the doctrine when it enacted 12 U.S.C.A § 1823(e), which provides, as amended in 1994:
Agreements against interests of Corporation.
*553(1) In general. No agreement which tends to diminish or defeat the interest of the Corporation in any asset acquired by it under this section or section [12 U.S.C.A § 1821], either as security for a loan or by purchase or as receiver of any insured depository institution, shall be valid against the Corporation unless such agreement—
(A) is in writing,
(B) was executed by the depository institution and any person claiming an adverse interest thereunder, including the obligor, contemporaneously with the acquisition of the asset by the depository institution,
(C) was approved by the board of directors of the depository institution or its loan committee, which approval shall be reflected in the minutes of said board or committee, and
(D) has been, continuously, from the time of its execution, an official record of the depository institution.
The rule that has evolved from the statute and the Supreme Court opinion “is that no agreement between a borrower and a bank which does not plainly appear on the face of an obligation or in the bank’s official records is enforceable against the FDIC.” Adams v. Madison Realty & Dev., Inc., 937 F.2d 845, 852 (3d Cir.1991). See also Remington Investments, Inc. v. Davis, 287 N.J.Super. 360, 366-67, 671 A.2d 158 (App.Div.1996). Both federal and state bank examiners must be entitled “to rely on a bank’s records in evaluating the worth of [its] assets.” Langley v. FDIC, 484 U.S. 86, 91, 108 S.Ct. 396, 399, 98 L.Ed.2d 340, 347 (1987). “Neither the FDIC nor state banking authorities would be able to make reliable evaluations if bank records contained seemingly unqualified notes that are in fact subject to undisclosed conditions.” Id. at 91-92, 108 S.Ct. at 401, 98 L.Ed.2d at 347. In addition, the requirements of § 1823(e), that the agreement be executed contemporaneously and be approved by the bank’s loan committee, “ensure mature consideration of unusual loan transactions by senior bank officials, and prevent fraudulent insertion of new terms, with the collusion of bank employees, when a bank appears headed for failure.” Id. at 92, 108 S.Ct. at 401, 98 L.Ed.2d at 347. Otherwise phrased:
Fundamentally, D’Oench attempts to ensure that FDIC examiners can accurately assess the condition of a bank based on its books. The doctrine means that the government has no duty to compile oral histories of the bank’s customers and loan officers. Nor must the FDIC retain linguists and eryptologists to tease out the *554meaning of facially-uneneumbered notes. Spreadsheet experts need not be joined by historians, soothsayers, and spiritualists in a Lewis Carroll-like search for a bank’s unrecorded liabilities.
[Bowen v. FDIC, 915 F.2d 1013, 1016 (5th Cir.1990).]
Accord FDIC v. Bathgate, 27 F.3d 850, 861 (3d Cir.1994).
Langley, supra, forecloses defendant’s claim based on fraud when viewed against federal as opposed to state law. Count two of the counterclaim alleged that both bank officials and PDC officials falsely promised that the bank would perform the September 1989 contract, and that defendant relied on those promises in signing the December 1989 and October 1990 modification agreements. Similarly, in Langley, the borrowers charged the bank with fraudulently misrepresenting the size and value of the property they purchased with bank financing. The Court there held that under 12 U.S.C.A. § 1823(e), fraud in the inducement was no defense against the FDIC as receiver for the defunct bank. 484 U.S. at 93,108 S.Ct. at 402, 98 L.Ed.2d at 348.
For purposes of summary judgment only, the motion judge concluded that defendant offered enough to satisfy most of the statutory prerequisites of § 1823(e) and the D’Oench Duhme doctrine. Since on this summary judgment motion defendant was entitled to the benefit of all favorable facts and inferences, R. 4:46-2(c), the trier of fact could find that, based on Frignoca’s certification, the contract was filed in the appropriate place and approved by the appropriate authorities, and that the three-month gap between the contract and the December note and mortgage satisfied the contemporaneous execution requirement.
We note that at the eventual trial of this issue, as opposed to this summary judgment application, the statute imposes a difficult burden on the debtor. For example, it would be immaterial if the bank’s board of directors actually approved the September contract if that approval was not actually reflected in the bank’s official records. FDIC v. Krause, 904 F.2d 463, 466 (8th Cir. *5551990).1 Similarly, the three-month gap between the contract and the modification note and mortgage might stretch the contemporaneous execution requirement beyond the limit of the statute. See Resolution Trust Corp. v. Midwest Fed. Sav. Bank, 36 F.3d 785, 796-98 (9th Cir.1993) (ruling that a commitment letter written two-and-a-half months prior to the execution of the actual loan satisfied the contemporaneous requirement of 12 U.S.C.A. § 1823(e)(1)(B)). Moreover, defendant would have to show that an agreement with a bank’s wholly-owned subsidiary could be used to challenge a note issued by the parent bank, an agency argument that at least one court has rejected in the context of the party claiming relief from a bank loan. See Resolution Trust Corp. v. Hidden Ponds Phase IV Dev. Assocs., 873 F.Supp. 799, 806 (E.D.N.Y.1995).
According to the motion judge, the real problem here was that the contract and subsequent notes and mortgage did not at least cross-reference each other. Plaintiff reasons that a federal bank examiner would have no way of knowing that an apparent asset of the bank was conditioned or limited by the preexisting contract. Defendant responds that there is no requirement that the condition appear in the note, so long as the contract met all of the requirements of section 1823(e). He relies on that portion of Adams, supra, which states an either/or test, regarding a reference to the agreement in the loan obligation itself or in the bank’s records. 937 F.2d at 852, and the clear statement in the statute. See 12 U.S.C.A. § 1823(e)(1)(C) and (D).
*556Two cases relied upon by the motion judge are factually distinguishable because neither dealt with a situation where the debtor relied on a properly executed contract or on records maintained in the bank’s official files. See Resolution Trust Corp. v. Daddona, 9 F.3d 312, 316 (3d Cir.1993); Federal Sav. & Loan Ins. Corp. v. Two Rivers Assoc., 880 F.2d 1267, 1275-76 (11th Cir.1989). Nor is the case cited by plaintiff as dispositive of this appeal, FDIC v. Bathgate, 27 F.3d 850 (3d Cir.1994), actually on point. There, a letter offering to consolidate existing loans never ripened into a contract because it expired on its own terms before it was properly executed by both parties. Id. at 853-65. For purposes of the summary judgment motion in our case, we assume that the September agreement is a binding contract.
Nonetheless, there is language in all three of these cases supporting the judge’s conclusions. In Two Rivers, supra, the court stated that a collateral agreement must be such as to put the federal banking authorities on notice that the note is subject to additional conditions. 880 F.2d at 1275. In Daddona, supra, the court held that to meet the “agreement ... in writing” requirement of section 1823(e), “not only does the existence of the agreement have to appear plainly on the face of an obligation, but the basic structure of that agreement — its essential terms — must also appear plainly on the face of that obligation.” 9 F.3d at 319. And in Bathgate, supra, the court emphasized that the failed bank’s written promise to consolidate existing loans did not contain “any language suggesting that the performance of this promise [wa]s a condition to Bathgate’s performance of his obligations on the preexisting notes.” 27 F.3d at 863. These statements imply documentation far beyond the requirements of the statute.
There are other cases, however, which deal more explicitly with the situation we have here, an apparently complete bilateral agreement, confirmed by bank records, that is asserted as a defense to an apparently unqualified note. In Levy v. FDIC, 7 F.3d 1054 (1st Cir.1993), a wholly-owned bank subsidiary formed for the purpose of real estate development formed a joint venture *557with some developers to convert an apartment complex into condominiums. A subsidiary of the developers performed the renovation work, after which the joint venture sold the property to plaintiff, who financed the purchase through the bank. The joint venture warranted the quality of the construction work, which turned out to be faulty. The purchaser sued all parties in state court for breach of that warranty. When the bank became insolvent, the FDIC removed the ease to federal court and sought summary judgment on the note.
The court began its decision by holding that the breach of written warranty was no defense to the FDIC’s counterclaim on the note. Id. at 1056-57. It assumed, without deciding, that it could disregard the corporate formalities. Id. at 1057. At best, the parties entered into two separate agreements, and the breach of warranty claim provided no defense to enforcement of the note; however, it might be a valid set-off for a recoupment claim. Ibid. But those set-off or recoupment claims could not be asserted against the FDIC. The claims which the nongovernmental borrower could enforce were only those contained in the very same agreement sought to be enforced by the FDIC, or in documents closely related to or integral to the loan transaction. Id. at 1057-58. “Thus, even were we to disregard [the subsidiary’s] status as a corporation separate from its parent, [the bank], we are still left with two distinct agreements, one which governs the purchase and renovation of the property, and the other which governs the financing thereof.” Id. at 1058.
Under the D’Oench Duhme doctrine, the breach of the warranty contract in Levy offered no defense to the suit on the note. Ibid. Yet in Levy, the obligation to be set off was that of the joint venture, not the bank or its subsidiary, and therefore the case is distinguishable.
Cardente v. Fleet Bank, 796 F.Supp. 603 (D.Me.1992), is perhaps the closest to the case before us. There plaintiff and a failed bank entered into a series of written contracts under which the bank loaned plaintiff money to purchase property, and the bank *558leased office space in the property at above-market rent. When the FDIC took over the failed bank it notified plaintiff that it was disaffirming the lease.2 About six months later, the FDIC sold the note and mortgage to defendant, a solvent bank. At issue was whether the FDIC’s repudiation of the lease constituted a defense to an action on the note. Plaintiff contended that the lease and the loan were part of a single transaction, all of which were appropriately documented in the bank’s files. Id. at 610. The court disagreed. Noting that the lease contained no reference to the note, and that the note made no mention of the lease, the court found that the two were independent contracts. Id. at 610-11. The asset which defendant sought to enforce, the note, was, on its face, unqualified and unambiguous. Id. at 612-13.3 But even in Cárdente, the relationship between the two transactions was not as close as in the ease before us, where the loan was for work on property that the bank had induced by its take-out commitment.
The underlying purpose of D’Oench, Duhme and § 1823(e) is to ensure that federal banking authorities are able to rely on facially unqualified notes. Langley, supra, 484 U.S. at 91-92, 108 S.Ct at 401, 98 L.Ed.2d at 347. Levy was cited with approval in Remington Invs., Inc. v. Davis, supra, for its broader reference to the loan documents or “closely related documents.” 287 N.J.Super. at 367, 671 A.2d 158. Indeed, in Remington, this court extended the scope of a borrower’s reliance to “a document which originated contemporaneously with the loans and which spell[ed] out an agreement that the loans would not have to be paid according to their apparent terms.” Ibid. In this case, if a federal bank examiner found the contract in the board minutes or *559bank’s other official files, he or she might have had reason to think that its breach would excuse payment of the notes. On the other hand, the agreement might, after a full hearing, appear to be an independent executory contract which could be disaffirmed under 12 U.S.C.A. § 1821(e) if and when the bank went into receivership. While it is undisputed on this appeal that plaintiff, as successor to the RTC, can invoke the protections of the D’Oench Duhme doctrine and section 1823(e), Davis, supra, 287 N.J.Super. at 366, 671 A.2d 158, there are threshold factual determinations that must be made after a full examination of the relevant evidence, before this defense can protect plaintiff.
IV.
We next briefly consider plaintiffs alternative argument that it is a holder in due course under federal common law and thus immune from any breach of contract defenses. Both plaintiff and the motion judge relied extensively on this court’s prior conclusion that the RTC enjoys holder in due course status “when it acquires a promissory note through a purchase and assumption transaction involving an insolvent bank.” Resolution Trust Corp. v. Associated Gulf Contractors, Inc., 263 N.J.Super. 332, 347, 622 A.2d 1324 (App.Div.), certif. denied, 134 N.J. 480, 634 A.2d 527 (1993). All relevant references in Associated Gulf to such “holder in due course” status, however, appear in quotation marks, indicating the use of the phrase as a shorthand for the federal doctrine, not the statutory holder in due course status under the Uniform Commercial Code. N.J.S.A. 12A:3-302.
The holder-in-due-course approach to analyzing the issues in this case presents difficulties. First, the doctrine has been viewed as having been undercut or rendered unnecessary by Langley, supra. See Midwest Fed. Sav. Bank, supra, 36 F.3d at 799 n. 6; Two Rivers Assocs., supra, 880 F.2d at 1277; Echevarria, supra, 43 Cath. U.L.Rev. at 792 (given Langley’s expansive interpretation of § 1823(e), the holder in due course status based on federal common law “becomes superfluous”). Second, defen*560dant raises colorable questions whether the federal common law holder in due course doctrine applies in this particular transaction. Third, in recent years the Supreme Court has twice rejected the FDIC’s attempt to create a federal common law to enhance its interests. O’Melveny & Myers, supra, 512 U.S. at 83-84, 114 S.Ct. at 2052-53, 129 L.Ed.2d at 73-74. See also Atherton v. FDIC, 519 U.S. 213, 117 S.Ct. 666, 136 L.Ed.2d 656 (1997). As the Court emphasized in O’Melveny & Myers, supra, as a general rule there is no federal common law, and in most instances the FDIC stands “in the shoes of the insolvent S & L to work out its claims under state law,” except when some provision of federal law expressly provides otherwise. 512 U.S. at 86, 114 S.Ct. at 2054, 129 L.Ed.2d at 75. This has led at least one court to conclude that there is no longer any such thing as a federal common law on holder in due course; that issue must be decided by reference to state law. DiVall Insured Income Fund v. Boatmen’s First Nat’l Bank, 69 F.3d 1398, 1402-03 (8th Cir.1995).4 With these later expressions, we feel constrained to reject the federal “holder in due course” claim of plaintiff, notwithstanding the contrary language in Associated Gulf, supra.
V.
Our conclusion, therefore, is that defendant has a possible claim or defense to the note arising out of the bank’s breach of the contract to purchase the property, but such a claim can be barred by § 1823(e) if defendant fails to satisfy the factors listed in § 1823(e)(1)(A) through (D). There was, however, a sufficient showing by defendant to defeat a summary adjudication of the *561issues, and this matter must therefore be remanded for a further threshold hearing. The court need not initially reach any substantive issues of the alleged breach of the bank’s agreement, and may confine its inquiry to the applicability of the statute to the notes at issue. The bank would thereby preserve its right to assert substantive defenses if defendant survives the section 1823(e) inquiry.
The summary judgment is reversed, and the matter is remanded to the Chancery Division for further proceedings in accordance with this opinion.
One case even went so far as to hold that the agreement itself would have to have been included in the bank's loan file on the borrower who claimed relief from the express terms of the note. See Resolution Trust Corp. v. McCrory, 951 F.2d 68, 72 (5th Cir.) (agreement limiting liability of individual partners is no defense where that agreement was kept in the office of the bank's attorney which was in the same building and on the same floor as the bank's loan files), cert. denied, 506 U.S. 972, 113 S.Ct. 459, 121 L.Ed.2d 368 (1992). We cannot say, however, that if the agreement was maintained in the bank’s official files and otherwise complied with the statute, a copy had to be kept in the loan file. After board approval, a borrower would have no control of where a clerk or junior official might place the document.
The FDIC has the statutory authority to repudiate contracts or leases signed by the failed financial institution. 12 U.S.C.A. § 1821(e).
The court also held that the documents failed the contemporaneous execution requirement, even though the entire transaction occurred over a period of less than two months. Cárdente, supra, 796 F.Supp. at 611. To that extent, the case can be viewed as inconsistent with the more debtor-friendly approach taken by the Ninth Circuit in Midwest Fed. Sav. Bank, supra, 36 F.3d at 797-98.
Indeed, there is a debate currently in the federal circuits as to whether the D’Oench Duhme doctrine itself survives outside section 1823(e). Compare Motorcity, supra, 83 F.3d at 1329 and 120 F.3d at 1142-44 with Murphy v. FDIC, 61 F.3d 34, 40 (D.C.Cir.1995). We do not think the outcome of the debate would affect the result here, since under Langley, supra, the purpose of section 1823(e) is to ensure that bank officials can quickly evaluate the worth of a bank's assets, and thus conditions must be expressed in the note itself or related documents. Daddona, supra, 9 F.3d at 319.