
731 F.Supp. 64 (1990)
YANKEE BANK FOR FINANCE & SAVINGS, FSB (Now the Federal Deposit Insurance Corporation, In Its Capacity as Receiver for Yankee Bank for Finance & Savings, FSB), Plaintiff,
v.
TASK ASSOCIATES, INC.; Hanover Square Associates-Two Limited Partnership; Delhi Steel Corp.; Lenehan & Sawicke, Inc.; Bianchi Excavating, Inc.; Spesieri Painting Co., Inc.; Tipperary Heating & Plumbing Corp.; *65 Carpet Wholesale, Inc.; WCA Roofing & Sheet Metal Co., Inc.; Raynor Overhead Door Sales Co., Inc.; B & P Ceramic Tile Co.; Edward Schalk & Sons, Inc.; Ajay Glass & Mirrors Co., Inc.; Pro Masonry Corporation; Midstate Elevator Co., Inc.; Hosek Contractors, Inc., d/b/a Eastern Painting Co., Inc.; Armani Plumbing & Mechanical, Inc.; Commercial Air Control, Inc.; Simone Electrical Contractors, Inc.; Donald J. Judd d/b/a Judd Associates; B.R. Johnson, Inc.; The People of the State of New York; C. G. Boone, Inc.; Stonefield Cleaning and Travers Maintenance Service, Inc.; Consolidated Electrical Distributors, Inc., Trading as CED. Baldwin-Hall; MCK Building Associates, Inc.; Bohem Manufacturing Company, Inc.; Surface Renewal Corporation; and Robertson, Strong Apgar Architects, P.C., Defendants.
No. 88-CV-224.
United States District Court, N.D. New York.
January 23, 1990.
*66 Hancock & Estabrook, Syracuse, N.Y., for plaintiff; Thomas C. Buckel, Jr., of counsel.
Menter Rudin & Trivelpiece, Syracuse, N.Y., for Consolidated Elec.; Antonio E. Caruso, of counsel.
Harris Beach Wilcox Rubin & Levey, Rochester, N.Y., for defendant Hanover Square Associates-Ltd.; Bruce L. Maas, of counsel.
Welch Welch & Carr, Syracuse, N.Y., for defendant Hosek Contractors; Anthony P. Adorante, of counsel.
Robert W. Hartnett, Syracuse, N.Y., for defendant Lenehan & Sawicke.
Hiscock & Barclay, Syracuse, N.Y., for defendant Raynor Overhead Door; Peter Hogan, of counsel.
John L. Stinziano, Syracuse, N.Y., Attorney for defendant Robertson Strong Apgar Architects.
MacKenzie Smith Lewis, Lewis Michell & Hughes, Syracuse, N.Y., for defendant Ajay Glass; Alfred W. Popkess, of counsel.
Bryant O'Dell and Basso, Syracuse, N.Y., for defendants Armani Plumbing, Schalk, Simone, WCA Roofing & MCK Building & B & P Ceramic; Robert Silkey, of counsel.
Bond Schoeneck & King, Syracuse, N.Y., for defendants Bianchi, Delhi Steel, Spensieri Painting & Tipperary Heating; Joseph J. Lawton, of counsel.
Andrews & Huffman, Syracuse, N.Y., for defendant Bohem Mfg.; Stephen J. Ransford, of counsel.
Lombardi Devorsetz Stinziano & Smith, Syracuse, N.Y., for defendant C.G. Boone; Terence A.J. Mannion, of counsel.
Robert Abrams, Atty. Gen. of the State of N.Y., Albany, N.Y., for defendant People of the State of New York; Alan Hegeman, Asst. Atty. Gen., of counsel.
Carrigan & Ryan, Syracuse, N.Y., for defendant Surface Renewal Corp.; William F. Carrigan, Jr., of counsel.
Robert Woodford, Syracuse, N.Y., referee.

MEMORANDUM-DECISION AND ORDER
McCURN, Chief Judge.

Introduction
This is an action to foreclose on a mortgage pursuant to N.Y. Real Property Actions and Proceedings Law § 1301 et seq. The subject of this litigation is a premises known as the SA & K building in Syracuse, New York. When first instituted, this matter was an ordinary foreclosure action pursuant to state law, instituted in state court. Yankee Bank for Finance and Savings, as mortgagee, had brought suit against the defendant real estate developers, as the mortgagors, who had allegedly defaulted on a loan. The bank also joined, as defendants, persons who had placed mechanic's liens on the property for uncompensated labor and materials provided in the course of renovating the SA & K building. While the litigation was proceeding, the Federal *67 Home Loan Bank Board found Yankee Bank to be insolvent and appointed the FDIC as its receiver. As a result, the FDIC was effectively substituted as the plaintiff in this action.
The participation of the FDIC operated to "federalize" the suitgreatly complicating many of the legal issues. In prior decisions this court has determined, among other things, that the action was properly removed to federal court and that the FDIC was entitled to summary judgment of foreclosure and sale as against defendant Hanover Square Associates-Two Limited Partnership  the real estate developer and mortgagor with respect to the SA & K building. The process for the foreclosure sale of the premises has been set in progress. Presently before the court is the January 2, 1990, report-recommendation of Magistrate Gustave J. Di Bianco which addresses the issue of who has priority of right, as between the plaintiff FDIC and the "mechanic's lienor" defendants, to the foreclosure sale proceeds. In a thorough report, familiarity with which is assumed, the Magistrate recommended that this court adopt state law as the rule of decision, find the plaintiff to have violated N.Y. Lien Law § 22, and based on this violation, hold that the plaintiff's interest in the foreclosure sale proceeds after the first $610,000 is inferior to the interest of the mechanic's lienor defendants. Both the plaintiff and the mechanic's lienor defendants submitted objections to the Magistrate's report-recommendation. The plaintiff also requests, should the court adopt the Magistrate's recommendations, that it be awarded interest on the $610,000 to which it would have first priority.

I. Jurisdiction
In its August 4, 1989, memorandum-decision and order, this court requested further briefing on the issue of whether it had jurisdiction to entertain the remaining claims and counterclaims between the plaintiff FDIC and the mechanic's lienors, as well as the claims between the mechanic's lienors themselves. The submissions of counsel revealed that the parties were in agreement that this court, in light of its decision in Yankee Bank v. Hanover Square Associates-One, 693 F.Supp. 1400, 1412 (N.D.N.Y.1988), had jurisdiction pursuant to 12 U.S.C. § 1819. On October 11, 1989, this court issued an order which held that it has subject matter jurisdiction to entertain the unresolved claims and counter claims in this matter and that it would proceed to hear and determine those issues. In his report-recommendation the Magistrate has provided a more detailed analysis of the reasons why this court has federal question and ancillary jurisdiction over the remaining legal claims. This court agrees with the Magistrate's analysis on the jurisdictional issue and adopts it as its own.

II. Choice of Law
The plaintiff FDIC and the mechanic's lienor defendants both claim priority to the proceeds from the foreclosure sale of the SA & K building. A key issue in this regard is whether New York State law should be employed as the rule of decision or whether a federal common law rule based on the "first in time, first in right" principle should be adopted by this court. The mechanic's lienors contend that the plaintiff has lost its priority interest because Yankee Bank, before it was placed into the receivership of the FDIC, failed to comply with provisions of N.Y. Lien Law § 22.
Among other things, section 22 of the Lien Law requires material modifications of building loan contracts to be filed within ten days after making the modification; "[i]f not so filed the interest of each party to such contract in the real property affected thereby, is subject to [subsequent mechanics'] lien[s]." The "subordination penalty" provided for in Lien Law § 22 was a result of the New York Legislature's intent to provide a special protection to the "materialmen, supplymen and laborers" on construction projects within the state. Nanuet National Bank v. Eckerson Terrace, Inc., 47 N.Y.2d 243, 247-48, 417 N.Y.S.2d 901, 903-04, 391 N.E.2d 983, 985-87 (1979). Section 22 in its present form was intended to enable persons interested in supplying labor and materials to a construction *68 project "to learn exactly what sum the loan in fact made available to the owner of the real estate for the project." Id. at 247, 417 N.Y.S.2d at 903, 391 N.E.2d at 985. Knowledge of the amount of available monies for the project would presumably permit a subcontractor to determine the ability of the general contractor to pay for supplies and services.
The mechanic's lienors assert that the plaintiff, as Yankee Bank, violated § 22 when it advanced funds on the SA & K project without first securing a surety payment bond from the real estate developers for the protection of the subcontractors. The mechanic's lienors assert that such a bond was required by the construction loan agreement and that the failure of Yankee Bank to require such a bond before advancing funds to the developer constituted an unfiled material modification. The plaintiff, while maintaining that it did not violate § 22, contends that the application of state law would interfere with important federal objectives  requiring this court to adopt an alternate federal common law rule.
The parties agree with the Magistrate that federal law applies to legal matters involving the FDIC in its administration of nationwide federal programs. See United States v. Kimbell Foods, Inc., 440 U.S. 715, 726, 99 S.Ct. 1448, 1457, 59 L.Ed.2d 711 (1979) (federal law applies to federal agencies when administering nationwide federal programs); Gunter v. Hutcheson, 674 F.2d 862, 869 (11th Cir.), cert. denied 459 U.S. 826, 103 S.Ct. 60, 74 L.Ed.2d 63 (1982) (FDIC is vested by Congress with the authority to "protect and stabilize the national banking system"). There being no specific congressional directive as to the federal rule of decision concerning foreclosure actions involving the FDIC, the court must apply the three-part balancing test articulated in United States v. Kimbell Foods, Inc., 440 U.S. at 727-28, 99 S.Ct. at 1457-58, to determine the correct rule of decision. As stated by the Magistrate, Kimbell requires a court to first "determine the nature of the federal program," secondly, decide "whether the application of state law would frustrate the specific objectives of the federal program," and thirdly, "consider the extent to which the application of a federal rule would disrupt commercial relations based upon state law." Magistrate's Report at 14. This choice of law analysis is aimed at avoiding the application of a state law which presents a "significant threat to any identifiable federal policy or interest" or is "specifically aberrant or hostile" to federal policy. Burks v. Lasker, 441 U.S. 471, 479-80, 99 S.Ct. 1831, 1837-38, 60 L.Ed.2d 404 (1979).
After reviewing the nature of the FDIC's role in the administration of the federal system of deposit insurance, the procedure used by the FDIC when acting as a receiver for an insolvent bank, and the statutory obligations of the agency, the Magistrate concluded that uniform national laws generally are necessary to protect the FDIC. Magistrate's Report at 22. However, the Magistrate went on to conclude that the adoption of state law as the rule of decision in this particular case would not pose a significant threat to federal policy or interests. Id. at 31. On this basis Magistrate Di Bianco recommended that the determination of who has priority of right to the proceeds from the foreclosure sale be based upon state law. Id. at 32.
The plaintiff, in its objections to the report-recommendation, asserts that the application of N.Y. Lien Law § 22 would operate to impair important federal objectives with respect to the FDIC's deposit insurance program, and therefore, should not be adopted as the rule of decision. The FDIC contends that application of section 22 would prevent it from being able to rely on the bank's written records when making determinations concerning the value of specific assets of a bank which has been placed in receivership. According to the plaintiff it would have to "independently verify" compliance with the bank's written covenants. In this manner, plaintiff attempts to place this issue within the doctrine enunciated in D'Oench, Duhme & Co. v. FDIC, 315 U.S. 447, 460, 62 S.Ct. 676, 680-81, 86 L.Ed. 956 (1942)  that secret or unwritten agreements may not be raised as *69 a defense to a suit by the FDIC because such agreements operate to deceive the banking authorities. See also Langley v. Federal Deposit Ins. Corp., 484 U.S. 86, 108 S.Ct. 396, 401-02, 98 L.Ed.2d 340 (1987).
This court agrees with the Magistrate that the D'Oench doctrine is not implicated by the claims of the mechanic's lienors. The court is not addressing a situation where an unwritten agreement is being used to defend against a claim of the FDIC in its role as a receiver. Rather, the defendant mechanic's lienors are asserting their claim based on an alleged failure on the part of Yankee Bank to comply with a written agreement. It would be incorrect to classify all failures by banks in FDIC receivership to comply with the terms of contracts to which they are parties as unwritten modifications to those agreements. If such were the case, the FDIC as a receiver could raise D'Oench as an effective defense to any claim by any party that the bank in receivership had breached a written agreement. Such an anomalous legal result does not arise from D'Oench and its progeny.
The court is also in agreement with the Magistrate's recommendation that state law should be adopted as the rule of decision in this case. Though it is a close question, it does not appear that the FDIC would be unduly hindered in the performance of its obligation to insure bank deposits if New York's Lien Law was applied as the rule of decision. This court will not elaborate on the Magistrate's well-reasoned analysis, see Magistrate's Report at 22-32, except to emphasize the following: This matter was already the subject of litigation at the time Yankee Bank was placed into receivership  a state of affairs with which the FDIC could readily familiarize itself when evaluating the bank's assets. Therefore, to the extent that the FDIC claims that application of state law as the rule of decision interfered with its ability to evaluate the worth of the SA & K building, they are in error. As was also pointed out by the Magistrate, the importance of accuracy when evaluating the value of a bank's assets is tempered by the fact that there is only so much precision that the FDIC can hope to achieve. Also important is that the defendant mechanic's lienors were not participants in the "violation" or "modification" of the construction loan agreement which is alleged to have taken place; to remove the benefit of Lien Law § 22 would therefore operate against the rights of "innocent" third-parties. New York Lien Law § 22 represents an important policy decision on the part of the State Legislature to protect mechanic's lienors, see Nanuet National Bank v. Eckerson Terrace, Inc., 47 N.Y.2d at 747-48, 417 N.Y.S.2d at 903-04, 391 N.E.2d at 985-87, which should not be discarded lightly. Finally, it is apparent that the FDIC has the ability to "spread the risk" associated with deposit insurance through the collection of insurance premiums from member banks and even from infusions of funds from the treasury. The FDIC is not so financially fragile that persons with viable state law claims should be deprived of the ability to fully assert these statutory rights against a bank simply because it has been placed in receivership.
The plaintiff FDIC also maintains that application of New York law would constitute an impermissible award of punitive damages against the United States without Congressional authorization. See Missouri Pacific R.R. Co. v. Ault, 256 U.S. 554, 563-64, 41 S.Ct. 593, 597, 65 L.Ed. 1087 (1921). However, this court agrees with the Magistrate's conclusion that the application of N.Y. Lien Law § 22 would not constitute a "punishment" of a federal agency. Though the remedy found in Lien Law § 22 is generally referred to as a "subordination penalty," Nanuet National Bank v. Eckerson Terrace, Inc., 47 N.Y.2d at 248, 417 N.Y.S.2d at 904, 391 N.E.2d at 986, the change in the order of priority does not involve the assessment of extra or punitive damages. Rather than being a punishment, section 22 operates to order priority of parties who are entitled to compensatory relief. In this manner it may be likened to the "first in time, first in right" principle which the plaintiff advocated as the preferred rule of decision in this case. Neither rule of decision could fairly be *70 termed punitive with respect to either party. Therefore, this court will apply New York law to determine the order of priority to the foreclosure sale proceeds.

III. Application of State Law
Under New York law a properly filed building loan mortgage generally has priority over the claims of mechanic's lienors to proceeds from a foreclosure sale. See N.Y. Lien Law §§ 13, 22. As previously discussed, however, Lien Law § 22 also requires that material modifications to the building loan contract be filed within ten days following the making of the modification. Failure to comply with the filing requirements results in a change in the priority of the liens, with the mechanic's liens taking priority over the interest of the party holding the building loan mortgage. Id. The defendant mechanic's lienors assert that the building loan agreement between Yankee Bank and the real estate developers required the developers to provide a surety payment bond for the protection of the subcontractors; that the agreement provided that no funds would be advanced by Yankee Bank beyond $610,000 without the bond; that Yankee Bank advanced funds beyond the $610,000 amount without first obtaining the required bond; and that this "modification" of the building loan agreement was never filed. Based on these assertions the mechanic's lienors claim that Lien Law § 22 was violated by the plaintiff, with the result that their interest in the foreclosure sale proceeds should take priority over that of the FDIC.
This court agrees with the Magistrate's conclusion that the terms of the construction loan agreement mandated that a surety payment bond be provided by the developers of the SA & K building to Yankee Bank. Magistrate's Report at 37-38. Though, as argued by the plaintiff, the language of the contract could be construed to make the provision of the bond discretionary with the lender, the more plausible reading of the entire agreement is that Yankee Bank was required to post the bond before any more than $610,000 of the loan proceeds could be advanced on the SA & K project. Having made this determination, it is clear that the construction loan agreement created specific rights in third parties, namely the defendant mechanic's lienors. Such a bond would have permitted the mechanic's lienors to sue for payment directly on the bond, thereby greatly increasing the chances that they would get paid. The plaintiff's failure to require the bond was therefore a "material modification" to the loan agreement because it "restrict[ed] or impair[ed] the rights of [a] ... third party beneficiary." HNC Realty Company v. Bay View Towers Apartments, Inc., 64 A.D.2d 417, 409 N.Y.S.2d 774, 780 (2nd Dept.1978).
Plaintiff contends that the Magistrate erroneously concluded (1) that the defendant mechanic's lienors do not qualify as third-party beneficiaries under the Lien Law and (2) that the failure to obtain the payment bond was not a "material" modification of the loan agreement. This court disagrees. The Magistrate's interpretation and application of HNC Realty Company v. Bay View Towers Apartments, Inc., the most closely analogous state court case, was correct. Therefore, the Magistrate's conclusions are adopted by this court, see Magistrate's Report at 35-40, and the plaintiff's mortgage will be subordinated to the interests of the mechanic's lienor defendants pursuant to N.Y. Lien Law § 22.

IV. Degree of Subordination and Payment of Accrued Interest
A. Degree of Subordination. The key reason behind the State Legislature's enactment of Lien Law § 22, with its filing requirements, was to permit contractors and subcontractors on construction projects to "learn exactly what sum the loan ... made available to the owner of the real estate for [improvement of] the project." Nanuet National Bank v. Eckerson Terrace, Inc., 47 N.Y.2d at 247, 417 N.Y.S.2d at 903, 391 N.E.2d at 985. The duly filed construction loan agreement allowed Yankee Bank to advance up to $610,000 for the acquisition of the SA & K building before a surety payment bond was required to be posted. See Construction Loan Agreement, Section 3.3. The record evidence reveals *71 that Yankee Bank's first advance to the defendant real estate developers was $610,000. However, the amount actually expended for the purchase of the SA & K building, as ascertained from the deed filed with the County Clerk's Office, was approximately $250,000. The Magistrate concluded that the subcontractors who reviewed the loan contract would have no reason to believe that a smaller portion than $610,000 of the loan proceeds would be spent to acquire the premises. The subcontractors would, therefore, have no reason to believe that any additional funds would have been available to pay for improvements on the construction project. On this basis the Magistrate recommended that the defendant mechanic's lienors be afforded priority to the foreclosure sale proceeds after $610,000 had been paid to the plaintiff FDIC. Magistrate's Report at 40-41.[1]
The mechanic's lienors object to this finding by the Magistrate, contending that they should take priority over foreclosure sale proceeds beyond those costs actually expended toward the purchase of the SA & K building. Under this scenario the plaintiff would have first priority in an amount equivalent to that expended by Yankee Bank toward the purchase of the SA & K building, the mechanic's lienors would together have a second priority to the proceeds, and finally the plaintiff would have a third priority to any remaining funds from the foreclosure sale. This court agrees with the mechanic's lienors. Lien Law § 22 does make reference to the construction loan agreement as a source of determining rights as between certain parties. However, these parties are restricted by the language of the statute to "person[s] who ... had furnished or contracted to furnish materials, or had performed or contracted to perform labor for the improvement of real property." Id. In other words, reference to the contract is permitted when determining rights as between laborers and materialmen. The priority of right of "each party to [the construction loan] contract," (in this case Yankee Bank and the real estate developers were the parties to the construction loan contract), is subject to specific statutory language. The contract does not govern priority rights as between the parties to the contract and the mechanic's lienors  the Lien Law does. When, as here, the parties to the contract fail to file a material modification to the building loan contract "their interest ... is subject to [subsequent mechanics'] liens[s]." Lien Law § 22 (as quoted in Nanuet National Bank v. Eckerson Terrace, Inc., 47 N.Y.2d at 247, 417 N.Y. S.2d at 903, 391 N.E.2d at 985-86. In Nanuet the New York Court of Appeals, upon finding a violation of section 22, subjected a bank's entire interest in a building loan mortgage[2] to that of the mechanic's lienors. Id. at 248-249, 417 N.Y.S.2d at 904, 391 N.E.2d at 986-87; see also HNC Realty Co. v. Bay View Towers Apartments, 64 A.D.2d 417, 409 N.Y.S.2d 774 at 776; HNC Realty Co. v. Goland Hts. Developers, Inc., 79 Misc.2d 696, 360 N.Y.S.2d 954, 959-60 (Sup.Ct. Rockland Co. 1974) (cited favorably by the Court of Appeals).
This court concludes that the plaintiff FDIC has a first priority in the foreclosure sale proceeds only up to that amount actually expended toward the purchase of the *72 SA & K building by Yankee Bank. Defendant mechanic's lienors' interest will take effect after that amount with any remainder going to the plaintiff. The record evidence does not permit the court to make an exact determination as to the amount expended toward the purchase. This matter will be referred to Magistrate Di Bianco.
B. Accrued Interest. The plaintiff asserts that it is entitled to the interest which has accrued on that portion of the foreclosure sale proceeds to which it does have priority. The court agrees with the plaintiff. A mechanic's lienor who has priority over another party has a lien for the "principal and interest, of the value, or the agreed price, of such labor or materials." Lien Law § 3; see also § 13. Along these same lines, section 1354(1) of the Real Property Actions and Proceedings Law instructs the officer conducting a foreclosure sale to pay to the mortgagee both the amount of debt on the note as well as the interest which has accrued. Therefore, a mortgagee with a complete priority over a duly filed mechanic's lienor takes both principal and interest before any payment is made to the mechanic's lienor. Home Federal Savings and Loan Association v. Four Star Heights, Inc., 70 Misc.2d 118, 333 N.Y.S.2d 334, 340 (Sup.Ct. Kings Co. 1971). Moreover, the rate at which interest accrues is the rate specified in the contract until the contract is merged in a judgment. Stull v. Joseph Feld, Inc., 34 A.D.2d 655, 309 N.Y.S.2d 985, 987 (A.D.2d 1970); Citibank N.A. v. Liebowitz, 110 A.D.2d 615, 487 N.Y.S.2d 368, 369 (A.D.2d 1985). Though there is no case law which specifically addresses the issue of interest payments on a "bifurcated" mortgage, the cases and statutes lead to the conclusion that New York law entitles persons, with a priority interest in foreclosure sales proceeds, to the accrued interest on that portion of principal which is due and owing. Therefore, this court holds that the plaintiff FDIC is entitled to the interest at the contractual rate from the time of the default until October 10, 1989  the date the court filed the order directing the foreclosure sale of the SA & K building. From October 10, 1989, onwards, the interest is to be calculated at the rate permitted under New York law.

Conclusion
This court holds: (1) that the law of New York provides the rule of decision in this case; (2) that the plaintiff, as Yankee Bank, acted in violation of N.Y. Lien Law § 22; (3) that the plaintiff's priority as to the foreclosure sale proceeds is limited to the amount actually expended toward the purchase of the SA & K building plus interest calculated in conformity with this decision, the defendant mechanic's lienors having priority of right after this amount; and (4) that Magistrate Di Bianco shall retain jurisdiction over the action for purposes of determining (A) the amount actually expended toward the purchase of the SA & K building by Yankee Bank and (B) the validity and reasonableness of the mechanic's liens.
IT IS SO ORDERED.
NOTES
[1]  It should be noted that the Magistrate's decision appears to be in conformance with the reasoning of Thomas Lowery Jr., Justice of the New York State Supreme Court, Onondaga County, in a decision he rendered on various motions with respect to foreclosure and sale proceedings on the Larned building in Syracuse, N.Y. See Yankee Bank for Finance and Savings, FSB v. Hanover Square Associates-One Limited Partnership et al., Index No. 87-3576, Nov. 30, 1987, at 17-18. That decision was issued prior to Yankee Bank being placed in receivership, yet involved nearly identical issues and parties as in this suit. Justice Lowery and Magistrate Di Bianco both concluded that the rights of the mechanic's lienors are to be determined by the construction loan agreement. Magistrate Di Bianco interpreted the agreement in the present suit as giving the mechanic's lienors priority only after the first advance of $610,000.
[2]  By definition a "building loan contract" and "building loan mortgage" only operate with respect to money lent for improvements on real property. Lien Law § 2(13), (14). Therefore, the proceeds from the loan which were lent for the purchase of the property are not subject to the subordination penalty of Lien Law § 22.
