EXHIBIT 10.17.2 CUSTODIAL AGREEMENT CUSTODIAL AGREEMENT (as amended, restated, supplemented or otherwise modified and in effect from time to time, this "Custodial Agreement"), dated as of January 27, 2006, made by and among: (i) AMERICAN HOME MORTGAGE CORP., a New York corporation, AMERICAN HOME MORTGAGE INVESTMENT CORP., a Maryland corporation, AMERICAN HOME MORTGAGE HOLDINGS, INC., a Delaware corporation, AMERICAN HOME MORTGAGE ACCEPTANCE, INC., a Maryland corporation, and AMERICAN HOME MORTGAGE SERVICING, INC., a Maryland corporation, (each a "Seller", collectively the "Sellers"); (ii) MORGAN STANLEY BANK (the "Buyer Agent"); and (iii) DEUTSCHE BANK NATIONAL TRUST COMPANY, as custodian for the Buyer Agent pursuant to this Custodial Agreement (in such capacity, the "Custodian"). RECITALS The Buyer Agent, the Custodian and the Sellers are parties to that certain Amended and Restated Custodial Agreement, dated as of November 26, 2003 (as amended, supplemented or otherwise modified prior to the date hereof, the "Existing Custodial Agreement"). The Sellers and the Buyer Agent are parties to that certain Master Repurchase Agreement, dated as of the date hereof (as amended, restated, supplemented or otherwise modified and in effect from time to time, the "Repurchase Agreement"), pursuant to which the Buyers have agreed, subject to the terms and conditions of the Repurchase Agreement, to purchase Eligible Mortgage Loans (as defined therein) from the Sellers. The Repurchase Agreement is being entered into in substitution for that certain Amended and Restated Master Loan and Security Agreement, dated as of November 26, 2003, among the parties thereto. It is a condition precedent to the effectiveness of the Repurchase Agreement, and the Sellers, the Custodian and the Buyer Agent have agreed, that this Custodial Agreement shall be substituted for the Existing Custodial Agreement. Accordingly, the Sellers, the Custodian and the Buyer Agent hereby agree, in consideration of the mutual premises and mutual obligations set forth herein, that this Custodial Agreement is entered into in substitution for the Existing Custodial Agreement, and in furtherance of the foregoing agree as follows: Section 1. Definitions. Unless otherwise defined herein, terms defined in the Repurchase Agreement shall have their respective assigned meanings when used herein, and the following terms shall have the following meanings: "Affiliate" shall mean (i) with respect to the Buyer Agent, MS & Co. and Morgan Stanley Dean Witter & Co., and (ii) with respect to any other Person, any "affiliate" of such Person as such term is defined in the United States Bankruptcy Code in effect from time to time. "Agency" shall mean Fannie Mae or Freddie Mac. "Agency Guide" shall mean, with respect to Fannie Mae securities, the Fannie Mae Selling Guide and the Fannie Mae Servicing Guide, with respect to Freddie Mac securities, the Freddie Mac Sellers' and Servicers' Guide, and with respect to California Program securities, the applicable program manual and the servicer's guide, in each case including all exhibits thereto, as such Agency Guide may be amended, supplemented or otherwise modified from time to time." "Agency Program" shall mean a specific mortgage backed securities swap or purchase program under the relevant Agency Guide or as otherwise approved by the Agency with respect to Mortgage Loans originated pursuant to the Agency Guide. "Assignment of Mortgage" means, with respect to any mortgage, an assignment of the mortgage, notice of transfer or equivalent instrument in recordable form, sufficient under the laws of the jurisdiction wherein the related mortgaged property is located to reflect the assignment and pledge of the mortgage. "Authorized Representative" shall have the meaning specified in Section 18 hereof. "Business Day" shall mean any day other than (i) a Saturday or Sunday or (ii) a day on which the New York Stock Exchange, the Federal Reserve Bank of New York or the Custodian is authorized or obligated by law or executive order to be closed. "Cooperative Corporation" shall mean the cooperative apartment corporation that holds legal title to a Cooperative Project and grants occupancy rights to units therein to stockholders through Proprietary Leases or similar arrangements. "Cooperative Mortgage Loan" shall mean a Mortgage Loan that is secured by a first lien on a perfected security interest in Cooperative Shares and the related Proprietary Lease granting exclusive rights to occupy the related Cooperative Unit in the building owned by the related Cooperative Corporation. "Cooperative Project" shall mean all real property owned by a Cooperative Corporation including the land, separate dwelling units and all common elements. "Cooperative Shares" shall mean the shares of stock issued by a Cooperative Corporation and allocated to a Cooperative Unit and represented by a stock certificate. "Cooperative Unit" shall mean a specific unit in a Cooperative Project. "Custodial Agreement" shall mean this Custodial Agreement, as the same shall be amended, restated, supplemented or otherwise modified and in effect from time to time in accordance with the terms hereof. 2 "Custodial Delivery Failure" shall have the meaning assigned to such term in Section 13(c). "Custodial Identification Certificate" shall mean the certificate executed by the Sellers in connection with the sale of Eligible Mortgage Loans to the Buyers to be held by the Custodian pursuant to this Custodial Agreement, a form of which is attached as Annex 3 hereto. "Electronic Agent" shall have the meaning assigned to such term in Section 2 of the Electronic Tracking Agreement. "Electronic Tracking Agreement" shall mean the Electronic Tracking Agreement, dated as of the date hereof, among the Sellers, the Buyer Agent, the Electronic Agent and MERS, as the same shall be amended, restated, supplemented or otherwise modified and in effect from time to time. "Eligible Cooperative Mortgage Loan" shall mean a Cooperative Mortgage Loan as to which the representations and warranties in Section 6.11 of the Repurchase Agreement and the eligibility criteria set forth in Part I of Schedule 1 of the Repurchase Agreement are correct. "Eligible Mortgage Loan" shall mean a Mortgage Loan secured by a first mortgage lien on a one-to-four family residential property (a) as to which the representations and warranties in Section 6.10 and Part I of Schedule 1 of the Repurchase Agreement are correct and (b) which is either an Agency Eligible Mortgage Loan, an Alternate `A' Mortgage Loan, a California Program Mortgage Loan, an Eligible Cooperative Mortgage Loan, a Jumbo Mortgage Loan, a MERS Designated Mortgage Loan or a Conduit Eligible Mortgage Loan; provided, that in no event shall any Eligible Mortgage Loan be a security for purposes of any securities or blue sky laws. "Exception" shall mean, with respect to any Mortgage Loan, any of the following: the variances from the requirements of Section 2 hereof with respect to the Mortgage Files (giving effect to the Sellers' right to deliver certified copies in lieu of original documents in certain circumstances). "MERS Designated Mortgage Loan" shall have the meaning assigned to such term in Section 3 of the Electronic Tracking Agreement. "MERS Identification Number" shall mean the eighteen digit number permanently assigned to each MERS Designated Mortgage Loan. "MERS Procedures Manual" shall mean the MERS Procedures Manual attached as Exhibit B to the Electronic Tracking Agreement, as it may be amended, supplemented or modified from time to time. "MERS Report" shall mean the schedule listing MERS Designated Mortgage Loans and other information prepared by the Electronic Agent pursuant to the Electronic Tracking Agreement. 3 "MERS(R) System" shall mean the Electronic Agent's mortgage electronic registry system, as more particularly described in the MERS Procedures Manual." "Mortgage File" shall mean, as to each Mortgage Loan, those documents listed in Section 2 of this Custodial Agreement that are delivered to the Custodian or which at any time come into the possession of the Custodian. "Mortgage Loan" shall mean a mortgage loan which the Custodian has been instructed to hold for the Buyer Agent pursuant to this Custodial Agreement. "Mortgage Loan Schedule" shall mean a list (in computer readable form) of Eligible Mortgage Loans to be sold pursuant to the Repurchase Agreement, attached to a Custodial Identification Certificate, setting forth, as to each Eligible Mortgage Loan, the applicable information specified on Annex 1 to this Custodial Agreement. "Mortgage Loan Schedule and Exception Report" shall mean a list of Eligible Mortgage Loans delivered by the Custodian to the Buyer Agent on each Business Day, reflecting the Mortgage Loans held by the Custodian for the benefit of the Buyer Agent on behalf of the Buyers, which includes codes indicating any Exceptions with respect to each Mortgage Loan listed thereon. Each Mortgage Loan Schedule and Exception Report shall set forth (a) the Mortgage Loans being sold to the Buyers on any applicable Purchase Date as well as the Mortgage Loans previously sold to the Buyers and held by the Custodian hereunder, (b) any Mortgage Loan that has been released to a Seller pursuant to Section 5 hereof and the date such Mortgage Loan was released and (c) all Exceptions with respect thereto, with any updates thereto from the time last delivered. "Officer's Certificate" shall mean a certificate signed by a Responsible Officer of the Person delivering such certificate and delivered as required by this Custodial Agreement. "Opinion of Counsel" shall mean a written opinion letter of counsel in form and substance reasonably acceptable to the party receiving such opinion letter. "Pledgee" shall have the meaning specified in Section 25 hereof. "Proceeds" shall mean whatever is receivable or received when Purchased Items or proceeds are sold, collected, exchanged or otherwise disposed of, whether such disposition is voluntary or involuntary, and includes, without limitation, all rights to payment, including return premiums, with respect to any insurance relating thereto. "Proprietary Lease" shall mean a lease on (or occupancy agreement with respect to) a Cooperative Unit evidencing the possessory interest of the owner of the Cooperative Shares or the Seller in such Cooperative Unit. "Recognition Agreement" shall mean, with respect to a Cooperative Mortgage Loan, an agreement executed by a Cooperative Corporation which, among other things, acknowledges the lien of the Mortgage on the Mortgaged Property in question. 4 "Report" shall mean a report in computer readable form prepared by the Custodian, which shall be in a form acceptable to the Buyer Agent and the Custodian detailing, with respect to any Mortgage Loan that has been released by the Custodian, the following: (i) the Mortgage Loan identification number and borrower name, (ii) the location to which such Mortgage File was delivered by the Custodian and (iii) the date on which such Mortgage File was released by the Custodian. "Review Procedures" shall have the meaning specified in Section 3(c) hereof. "Security Agreement" the specific security agreement creating a security interest on and pledge of the Cooperative Shares and the appurtenant Proprietary Lease securing a Cooperative Mortgage Loan. "Trust Receipt" shall mean a Trust Receipt in the form annexed hereto as Annex 2 delivered to the Buyer Agent by the Custodian covering all of the Mortgage Loans subject to this Custodial Agreement from time to time, as reflected on the Mortgage Loan Schedule and Exception Report attached thereto in accordance with Section 3(e). Section 2. Delivery of Mortgage Files. No later than 11:00 p.m., New York City time, one (1) Business Day prior to any Purchase Date (in the case of the first 150 Eligible Mortgage Loans delivered in connection with any Purchase Date) plus one additional Business Day prior to any Purchase Date (for each additional 100 Eligible Mortgage Loans in excess thereof delivered in connection with any Purchase Date) (provided, that, such timing requirements shall be inapplicable in the case of Mortgage Loans already held by the Custodian for any other reason), the applicable Seller shall release to the Custodian the following original documents pertaining to each Eligible Mortgage Loan to be sold to the Buyers and included in the Margin Base on such Purchase Date, each of which Mortgage Loans shall be identified in a Mortgage Loan Schedule delivered therewith, in a computer readable format acceptable to the Sellers and the Custodian, with a copy of such Mortgage Loan Schedule delivered to the Buyer Agent (or, if another time is specified below for such release or delivery, at such other time): (A) With respect to each Eligible Mortgage Loan: (a) The original Mortgage Note bearing all intervening endorsements, endorsed "Pay to the order of _________ without recourse" and signed in the name of the last endorsee (the "Last Endorsee") (in the event that the Mortgage Loan was acquired by the Last Endorsee in a merger, the signature must be in the following form: "[Last Endorsee], successor by merger to [name of predecessor]"; in the event that the Mortgage Loan was acquired or originated by the Last Endorsee while doing business under another name, the signature must be in the following form: "[Last Endorsee], formerly known as [previous name]"). (b) The original of the guarantee executed in connection with the Mortgage Note (if any). 5 (c) The original Mortgage with evidence of recording thereon, or a copy thereof together with an Officer's Certificate of the applicable Seller, title company, escrow agent or closing attorney certifying that such represents a true and correct copy of the original and that such original has been submitted for recordation in the appropriate governmental recording office of the jurisdiction where the Mortgaged Property is located. (d) The originals of all assumption, modification, consolidation or extension agreements (if any) with evidence of recording thereon, or copies thereof together with an Officer's Certificate of the applicable Seller, title company, escrow agent or closing attorney certifying that such represent true and correct copies of the originals and that such originals have each been submitted for recordation in the appropriate governmental recording office of the jurisdiction where the Mortgaged Property is located (provided, that the Custodian shall have no duty to verify whether any such documents exist). (e) Except in the case of a MERS Designated Mortgage Loan, the original Assignment of Mortgage in blank for each Mortgage Loan, in form and substance acceptable for recording and signed in the name of the Last Endorsee (in the event that the Mortgage Loan was acquired by the Last Endorsee in a merger, the signature must be in the following form: "[Last Endorsee], successor by merger to [name of predecessor]"; in the event that the Mortgage Loan was acquired or originated while doing business under another name, the signature must be in the following form: "[Last Endorsee], formerly known as [previous name]"). (f) Except in the case of a MERS Designated Mortgage Loan, the originals of all intervening assignments of mortgage (if any) with evidence of recording thereon, showing an unbroken chain of title from the originator thereof to the Last Endorsee or copies thereof together with an Officer's Certificate of the applicable Seller, title company, escrow agent or closing attorney certifying that such represent true and correct copies of the originals and that such originals have each been submitted for recordation in the appropriate governmental recording office of the jurisdiction where the Mortgaged Property is located. (g) [intentionally omitted.] (h) The original of any security agreement, chattel mortgage or equivalent document executed in connection with the Mortgage Loan; provided, that the Custodian shall have no duty to verify whether any such documents exist. (i) Solely with respect to each MERS Designated Mortgage Loan, a MERS Report. 6 (B) With respect to each Eligible Cooperative Mortgage Loan: (a) the original Security Agreement; (b) the original Cooperative Shares; (c) a stock power executed in blank by the Person in whose name the Cooperative Shares are issued; (d) the Proprietary Lease or occupancy agreement, accompanied by an assignment in blank of such proprietary lease; (e) a Recognition Agreement executed by the Cooperative Corporation, which requires the Cooperative Corporation to recognize the rights of the lender and its successors in interest and assigns, under the Cooperative Mortgage Loan, accompanied by an assignment of such recognition agreement in blank; (f) UCC-1 financing statements with recording information thereon from the appropriate governmental recording offices if necessary to perfect the security interest of the Cooperative Mortgage Loan under the Uniform Commercial Code in the jurisdiction in which the Cooperative Project is located, accompanied by UCC-3 financing statements executed in blank for recordation of the change in the secured party thereunder; and (g) any guarantees, if applicable. From time to time, the Sellers shall forward to the Custodian additional original documents or additional documents evidencing any assumption, modification, consolidation or extension of a Mortgage Loan approved by the applicable Seller, in accordance with the terms of the Repurchase Agreement, and upon receipt of any such other documents. Subject to the inclusion of these documents within the Custodial Identification Certificate and Mortgage Loan Schedule delivered by the Sellers, upon receipt, the Custodian shall hold such additional documents. With respect to any documents which have been delivered or are being delivered to recording offices for recording and have not been returned to the applicable Seller in time to permit their delivery hereunder at the time required, in lieu of delivering such original documents, such Seller shall deliver to the Custodian a true copy thereof with an Officer's Certificate of the applicable Seller, title company, escrow agent or closing attorney certifying that such copy is a true, correct and complete copy of the original, which has been transmitted for recordation. Each Seller shall deliver such original documents to the Custodian promptly when they are received. 7 Section 3. Custodial Identification Certificate; Mortgage Loan Schedule and Exception Report; Trust Receipt. (a) No later than 12:00 p.m., New York City time, two (2) Business Days prior to each Purchase Date, the applicable Seller shall provide the Custodian with a Custodial Identification Certificate and a related Mortgage Loan Schedule (such information contained on the Mortgage Loan Schedule shall be delivered to the Custodian in computer-readable form) with respect to the Eligible Mortgage Loans to be sold to the Buyers on such Purchase Date. If the Custodian has received such Custodial Identification Certificate by the time set forth above, and has received a Mortgage File for a Mortgage Loan identified on the Mortgage Loan Schedule attached thereto by the time set forth in Section 2 hereof, then on such Purchase Date, the Custodian will deliver, via electronic transmission acceptable to the Buyer Agent and the Custodian (or via facsimile in the event of a delivery failure via such electronic transmission), no later than 11:00 a.m., New York City time, to the Buyer Agent a Mortgage Loan Schedule and Exception Report for each Mortgage Loan sold on such date, with Exceptions identified by the Custodian as current as of the date and time of delivery of such Mortgage Loan Schedule and Exception Report. (b) Notwithstanding and in addition to the foregoing, on each Business Day, as of the opening of business on such Business Day, the Custodian shall deliver to the applicable Seller and the Buyer Agent, via electronic transmission acceptable to the Buyer Agent and the Custodian (or via facsimile in the event of a delivery failure via such electronic transmission), a superceding Mortgage Loan Schedule and Exception Report, in each case no later than 12:00 noon, New York City time, which shall supercede and replace any and all previously delivered Mortgage Loan Schedule and Exception Reports and which shall reflect the Exceptions identified by the Custodian as of the Business Day prior to the date of delivery of the applicable Mortgage Loan Schedule and Exception Report. (c) Each Mortgage Loan Schedule and Exception Report shall list all Exceptions using such codes as shall be in form and substance agreed to by the Custodian and the Buyer Agent. Each Mortgage Loan Schedule and Exception Report shall be superseded by a subsequently issued Mortgage Loan Schedule and Exception Report. The delivery of each Mortgage Loan Schedule and Exception Report to the Buyer Agent shall be the Custodian's representation that, other than the Exceptions listed as part of the Exception Report: (i) all documents required to be delivered in respect of such Mortgage Loan pursuant to Section 2 of this Custodial Agreement have been delivered and are in the possession of the Custodian as part of the Mortgage File for such Mortgage Loan, (ii) all such documents have been reviewed by the Custodian in accordance with the review procedures attached hereto as Annex 4 (the "Review Procedures") and appear on their face to be regular and to relate to such Mortgage Loan and to satisfy (except in the case of a MERS Designated Mortgage Loan) the requirements set forth in Section 2 of this Custodial Agreement, (iii) each Mortgage Loan (except in the case of a MERS Designated Mortgage Loan) identified on such Mortgage Loan Schedule and Exception Report is being held by the Custodian as the bailee for the Buyer Agent and/or its designees pursuant to this Custodial Agreement and (iv) each MERS Designated Mortgage Loan is being held by MERS as the bailee for the Buyer Agent and/or its designees pursuant to the Repurchase Agreement. 8 (d) In connection with a Mortgage Loan Schedule and Exception Report delivered hereunder by the Custodian, the Custodian shall make no representations as to and shall not be responsible to verify (A) the validity, legality, enforceability, due authorization, recordability, sufficiency, or genuineness of any of the documents contained in each Mortgage File, (B) the collectability, insurability, effectiveness or suitability of any such Mortgage Loan or (C) whether such Mortgage Loan is an "Eligible Mortgage Loan" pursuant to the Repurchase Agreement. Subject to the following sentence, each of the Sellers and the Buyer Agent hereby give the Custodian notice that from and after the Purchase Date, the Buyers shall own (or in the event the Transactions are characterized as loans, the Buyer Agent, for the ratable benefit of the Buyers, shall have a security interest in) each Mortgage Loan identified on a Mortgage Loan Schedule and Exception Report until such time that the Custodian receives written notice from the Buyer Agent that the Buyers no longer own such Mortgage Loan. In the event that the Buyers do not enter into a Transaction with the applicable Seller prior to 5:00 p.m., New York City time, on such Purchase Date, upon written notice thereof from the applicable Seller, acknowledged by the Buyer Agent, the Custodian shall hold or release to such Seller, pursuant to such Seller's written instructions, the Mortgage Loans in respect of the Mortgage Loan Schedule and Exception Report delivered by the Custodian on such Purchase Date. Each Mortgage Loan Schedule and Exception Report delivered to the Buyer Agent by the Custodian, via electronic transmission acceptable to the Buyer Agent and the Custodian (or via facsimile in the event of a delivery failure via such electronic transmission), shall be deemed superseded and canceled upon the delivery of a subsequent Mortgage Loan Schedule and Exception Report. (e) In addition to the foregoing, on the initial Purchase Date, the Custodian shall deliver to the Buyer Agent, no later than 11:00 a.m., New York City time, a Trust Receipt with a Mortgage Loan Schedule and Exception Report attached thereto via electronic transmission acceptable to the Buyer Agent and the Custodian (or via facsimile in the event of a delivery failure via such electronic transmission) (with the original to follow on the next Business Day). Each Mortgage Loan Schedule and Exception Report delivered by the Custodian to the Buyer Agent shall supersede and cancel the Mortgage Loan Schedule and Exception Report previously delivered by the Custodian to the Buyer Agent hereunder, and shall replace the then existing Mortgage Loan Schedule and Exception Report to be attached to the Trust Receipt. Notwithstanding anything to the contrary set forth herein, in the event that the Mortgage Loan Schedule and Exception Report attached to the Trust Receipt is different from the most recently delivered Mortgage Loan Schedule and Exception Report, then the most recently delivered Mortgage Loan Schedule and Exception Report shall control and be binding upon the parties hereto. Section 4. Obligations of the Custodian. (a) The Custodian shall maintain continuous custody of all items constituting the Mortgage Files in secure facilities in accordance with customary standards for such custody and shall reflect in its records the interest of the Buyers therein. Each Mortgage Note (and Assignment of Mortgage) shall be maintained in fire resistant facilities. (b) With respect to the documents constituting each Mortgage File relating to a Mortgage Loan listed on the related Mortgage Loan Schedule and Exception report, the Custodian shall (i) act exclusively as the bailee of, and custodian for, the Buyer Agent, (ii) hold 9 all documents constituting such Mortgage File received by it for the exclusive use and benefit of the Buyer Agent, and (iii) make disposition thereof only in accordance with the terms of this Custodial Agreement or with written instructions furnished by the Buyer Agent; provided, however, that in the event of a conflict between the terms of this Custodial Agreement and the written instructions of the Buyer Agent, the Buyer Agent's written instructions shall control. (c) In the event that (i) the Buyer Agent, any Seller or the Custodian shall be served by a third party with any type of levy, attachment, writ or court order with respect to any Mortgage File or any document included within a Mortgage File or (ii) a third party shall institute any court proceeding by which any Mortgage File or a document included within a Mortgage File shall be required to be delivered otherwise than in accordance with the provisions of this Custodial Agreement, the party receiving such service shall promptly deliver or cause to be delivered to the other parties to this Custodial Agreement copies of all court papers, orders, documents and other materials concerning such proceedings. The Custodian shall, to the extent permitted by law, continue to hold and maintain all the Mortgage Files that are the subject of such proceedings pending a final, nonappealable order of a court of competent jurisdiction permitting or directing disposition thereof. Upon final determination of such court, the Custodian shall dispose of such Mortgage File or any document included within such Mortgage File as directed by the Buyer Agent, which shall give a direction consistent with such court determination. Expenses and fees (including, without limitation, attorney's fees) of the Custodian incurred as a result of such proceedings shall be borne by the Sellers, jointly and severally. (d) The Buyer Agent hereby acknowledges that the Custodian shall not be responsible for the validity and perfection of the Buyer Agent's security interest in the Purchased Items hereunder, other than the Custodian's obligation to take possession of Purchased Items as set forth in Section 2 hereof. (e) The Custodian shall have no duties or responsibilities except those that are specifically set forth herein, shall not be liable except for the performance of such duties and obligations and no implied covenants or obligations shall be read into this Custodial Agreement against the Custodian. (f) The Custodian shall have no responsibility nor duty with respect to any Mortgage Files while not in its possession. (g) The Custodian shall be under no obligation to make any investigation into the facts or matters stated in any resolution, certificate, statement, acknowledgement, consent, order, document in the Mortgage File, or any other document. (h) The Custodian shall not be liable with respect to any action taken or omitted to be taken in accordance with the written direction, instruction, acknowledgment, consent or any other communication from the Buyer Agent. (i) The provisions of this Section 4 shall survive the resignation or removal of the Custodian and the termination of this Custodial Agreement. 10 Section 5. Release of Purchased Items. (a) From time to time until the Custodian is otherwise notified in writing by the Buyer Agent, which notice shall be given by the Buyer Agent only following the occurrence of an Event of Default, the Custodian shall, upon receipt of written request of the applicable Seller and written authorization of the Buyer Agent, to release documentation relating to Mortgage Loans in the possession of the Custodian to such Seller, or its designee, for the purpose of correcting documentary deficiencies relating thereto against a Request for Release and Receipt executed by the applicable Seller in the form of Annex 5-A hereto. The applicable Seller or its designee shall return to the Custodian each document previously released from the Custodian's Mortgage File within thirty (30) calendar days of receipt thereof. Each Seller hereby further represents and warrants to the Buyer Agent that any such request by a Seller for release of Purchased Items shall be solely for the purposes of correcting clerical or other non-substantial documentation problems in preparation for returning such Purchased Items to the Custodian for ultimate sale or exchange and that the applicable Seller has requested such release in compliance with all terms and conditions of such release set forth in the Repurchase Agreement. (b) From time to time until the Custodian is otherwise notified in writing by the Buyer Agent, which notice shall be given by the Buyer Agent only following the occurrence of an Event of Default, the Custodian shall, upon written receipt from the applicable Seller or its designee of a Request for Release of Documents and Receipt in the form of Annex 5-B hereto and written authorization of the Buyer Agent, release to such Seller or its designee the related Custodian's Mortgage File or the documents set forth in such request and receipt. The applicable Seller or its designee shall hold each Mortgage File delivered to it pursuant to this Section 5(b) as bailee for the Buyer Agent. Such Seller or its designee shall return to the Custodian each document previously released from the Custodian's Mortgage File within thirty (30) calendar days of receipt thereof. Each Seller hereby further represents and warrants to the Buyer Agent that any such request by any Seller or its designee for release of Purchased Items shall be solely for the purposes of foreclosure or servicing of any of the Mortgage Loans. (c) (i) Upon receipt of a Request for Release of Documents executed by the applicable Seller in the form of Annex 5-C hereto, with an electronic copy to the Buyer Agent, the Custodian shall release Mortgage Files in its possession to approved third-party purchasers listed on Annex 12 attached hereto (each an "Approved Purchaser") for the purpose of resale thereof. The applicable Seller or such Approved Purchaser shall return to the Custodian each document previously released from the Custodian's Mortgage File within forty-five (45) calendar days of receipt thereof. (ii) Any transmittal of documentation for Mortgage Loans in the possession of the Custodian in connection with the sale thereof to an Approved Purchaser will be under cover of a transmittal letter substantially in the form attached hereto as Annex 10 duly completed by the Custodian and executed by the Custodian. (iii) Any transmittal of documentation for Mortgage Loans in the possession of the Custodian in connection with the shipment to a custodian or trustee in connection with the formation of a mortgage pool supporting a mortgage-backed security (an "MBS") will be under cover of a transmittal letter substantially in the form attached 11 hereto as Annex 11. Promptly upon (x) the remittance by such Approved Purchaser of the full purchase price of the Mortgage Loan or (y) the issuance of such MBS, the Buyer Agent shall notify the Custodian thereof. In connection with any request to deliver Mortgage Files pursuant to this Section 5(c), the applicable Seller shall provide the Custodian with a Mortgage Loan Schedule in computer readable form and shall provide no less than one Business Day's notice for each 150 Mortgage Files requested for release; provided, that such prior notice shall not be required if the Custodian is to be the recipient of such files on behalf of such third-party purchaser or is the custodian or trustee in respect of such MBS. (d) From time to time until the Custodian is otherwise notified in writing by the Buyer Agent, and with the prior written consent of the Buyer Agent, the Sellers may substitute for one or more Eligible Mortgage Loans constituting the Purchased Items one or more substitute Eligible Mortgage Loans having aggregate Purchased Items Value equal to or greater than the Purchased Items Value of the Mortgage Loans being substituted for, or obtain the release of one or more Mortgage Loans constituting Purchased Items hereunder; provided that, after giving effect to such substitution or release, the Repurchase Obligations then outstanding shall not exceed the Margin Base, which determination shall be made solely by the Buyer Agent. In connection with any such requested substitution or release, the applicable Seller will provide notice to the Custodian and the Buyer Agent in the form of Annex 5-D attached hereto no later than 3:00 p.m., New York City time, on the date of such request, specifying the Mortgage Loans to be substituted for or released and the substitute Mortgage Loans to be sold hereunder in substitution therefor, if any, and shall deliver with such notice a Custodial Identification Certificate and a revised Mortgage Loan Schedule indicating any substitute Mortgage Loans. The Custodian will effect the requested substitution or release no later than 8:00 p.m., New York City time, two Business Days following the day on which such request was timely made for the first 150 such substitute Mortgage Loans (with one additional Business Day for each 100 additional substitute Mortgage Loans) (provided, that, such timing requirements shall be inapplicable in the case of Mortgage Loans already held by the Custodian for any other reason) after the Custodian has certified to the Buyer Agent on such Business Day that the matters set forth in Section 3(c) hereof with respect to any substitute Mortgage Loans are true and correct. Each such substitution or release shall be deemed to be a representation and warranty by the Sellers that any substitute Mortgage Loans are Eligible Mortgage Loans and that after giving effect to such substitution or release, the Repurchase Obligations then outstanding shall not exceed the Margin Base. (e) So long as the Custodian has not received written notice that any Event of Default has occurred and is continuing, the Custodian and the Buyer Agent shall take such steps as they may reasonably be directed from time to time by the applicable Seller in writing, which the applicable Seller deems necessary and appropriate, to transfer promptly and deliver to the applicable Seller any Mortgage File in the possession of the Custodian relating to any Mortgage Loan previously included in the Margin Base as an Eligible Mortgage Loan but which the Sellers or the applicable Seller, with the written consent of the Buyer Agent, have notified the Custodian has ceased to be an Eligible Mortgage Loan. In furtherance of the foregoing, upon receipt of written request from the applicable Seller in the form of Annex 5-D hereto, which must be acknowledged by the Buyer Agent, and provided that no Event of Default has occurred and is 12 continuing of which the Custodian shall have received written notice, the Custodian shall release to the applicable Seller the requested Mortgage Files. (f) Following the Buyer Agent's written instructions to the Custodian not to release any item of Purchased Items, the Custodian shall not release, or incur any liability to any Seller or any other Person for refusing to release, any item of Purchased Items to any Seller or any other Person without the express prior written consent and at the direction of the Buyer Agent. (g) The Custodian shall at all times monitor any release of Purchased Items under this Section 5 and shall track the period of time which has elapsed for any such release of Purchased Items. (h) Notwithstanding the foregoing, any Request for Release of Documents may be delivered to the Buyer Agent via electronic mail which attaches the appropriate form referenced in clauses (a) and (b) above, and the Buyer Agent's affirmative response via return electronic mail with an electronic copy to the Custodian shall constitute written consent for the purpose of this Section 5. Section 6. Fees and Expenses of Custodian. The Custodian shall charge such fees for its services under this Custodial Agreement as are set forth in a separate agreement between the Custodian and American Home Mortgage Corp., the payment of which fees, together with the Custodian's expenses (including, without, limitation, attorney's fees) in connection herewith, shall be solely the joint and several obligation of the Sellers. The obligations of the Sellers under this Section 6 shall survive the termination of this Custodial Agreement and any prior resignation or removal of the Custodian or prior termination or assignment of this Custodial Agreement. Section 7. Removal or Resignation of Custodian. (a) The Custodian may at any time resign and terminate its obligations under this Custodial Agreement upon at least 60 days' prior written notice to the Sellers and the Buyer Agent. Promptly after receipt of notice of the Custodian's resignation, the Buyer Agent shall appoint, by written instrument, a successor custodian, subject to written approval by the Sellers (which approval shall not be unreasonably withheld). One original counterpart of such instrument of appointment shall be delivered to each of the Sellers, the Custodian and the successor custodian. (b) The Buyer Agent, with the consent of the Sellers, upon at least sixty (60) days' prior written notice to the Custodian and the Buyer Agent, may remove and discharge the Custodian (or any successor custodian thereafter appointed) from the performance of its obligations under this Custodial Agreement. Promptly after the giving of notice of removal of the Custodian, the Buyer Agent shall appoint, by written instrument, a successor custodian, with the consent of the Sellers. One original counterpart of such instrument of appointment shall be delivered to each of the Sellers, the Buyer Agent, the Custodian and the successor custodian. (c) In the event of any such resignation or removal, upon the surrender of any outstanding Trust Receipts, the Custodian shall promptly transfer to the successor custodian, as 13 directed in writing, all the Mortgage Files being administered under this Custodial Agreement and, if the endorsements on the Mortgage Notes and the Assignments of Mortgage have been completed in the name of the Custodian, assign the Mortgages and endorse without recourse the Mortgage Notes to the successor Custodian or as otherwise directed in writing by the Buyer Agent. The cost of the shipment of Mortgage Files arising out of the resignation of the Custodian, if such resignation occurs within one year from the date of this Custodial Agreement, shall be at the expense of the Custodian; provided, however, that if the reason for the Custodian's resignation is due to the non-payment of the fees and expenses due it hereunder, then such shipment costs shall not be an expense of the Custodian, but shall be at the expense of the Sellers. Any cost of shipment arising out of the removal of the Custodian or the resignation of the Custodian after one year from the date of this Custodial Agreement shall be at the expense of the Sellers. The Sellers shall be responsible for the fees and expenses of the successor custodian and the fees and expenses for endorsing the Mortgage Notes and assigning the Mortgages to the successor custodian if required pursuant to this paragraph. (d) In the event that no successor Custodian shall have been appointed within the 60 day notice period described in Section 7(a) or 7(b) hereof, the Custodian may either (i) deliver the Mortgage Files to the Buyer Agent or its designee upon surrender of all outstanding Trust Receipts or (ii) in the event that the Buyer Agent or its designee fails to accept the Mortgage Files, petition any court of competent jurisdiction to appoint a successor custodian. Section 8. Examination of Mortgage Files. Upon reasonable prior notice to the Custodian and at the Sellers' expense, the Buyer Agent, the Sellers and each of their respective agents, accountants, attorneys and auditors will be permitted during normal business hours at its offices to examine the Mortgage Files, documents, records and other papers in the possession of or under the control of the Custodian relating to any or all of the Mortgage Loans. Section 9. Insurance of Custodian. At its own expense, the Custodian shall maintain at all times during the existence of this Custodial Agreement and keep in full force and effect fidelity insurance, theft of documents insurance, forgery insurance and errors and omissions insurance. All such insurance shall be in amounts, with standard coverage and subject to deductibles, all as is customary for insurance typically maintained by banks which act as custodian of collateral substantially similar to the Purchased Items. Upon written request, the Buyer Agent shall be entitled to receive a certificate of the respective insurer that such insurance is in full force and effect. Section 10. Representations and Warranties. (a) Each party represents and warrants to each other party that: (i) such party has the requisite power and authority and the legal right to execute and deliver, and to perform its obligations under, this Custodial Agreement, and has taken all necessary corporate action to authorize its execution, delivery and performance of this Custodial Agreement; 14 (ii) no consent or authorization of, filing with, or other act by or in respect of, any arbitrator or Governmental Authority and no consent of any other Person (including, without limitation, any stockholder or creditor of such party) is required with respect to such party in connection with the execution, delivery, performance, validity or enforceability of this Custodial Agreement; and (iii) this Custodial Agreement has been duly executed and delivered on behalf of such party and constitutes a legal, valid and binding obligation of such party, enforceable in accordance with its terms, except as enforceability may be limited by bankruptcy, insolvency, reorganization, moratorium or similar laws affecting the enforcement of creditors' rights generally and by general principles of equity (whether enforcement is sought in a proceeding in equity or at law). (b) The Custodian and each of the Sellers represents to the Buyer Agent that the Custodian is not an Affiliate of any Seller. Section 11. Statements. (a) Upon the reasonable written request of the Buyer Agent or the Sellers, the Custodian shall provide the Buyer Agent or the Sellers, as applicable, with a list of all the Mortgage Loans for which the Custodian holds a Mortgage File pursuant to this Custodial Agreement. Such list shall be in the form of a Mortgage Loan Schedule and Exception Report. (b) No later than 12:00 noon, New York City time, on each Business Day, and otherwise upon the reasonable request of the Buyer Agent, the Custodian shall deliver to the Buyer Agent and the Sellers a Report with respect to all Mortgage Loans currently held by the Custodian pursuant to this Custodial Agreement. Section 12. No Adverse Interest of Custodian. By execution of this Custodial Agreement, the Custodian represents and warrants that it currently holds, and during the existence of this Custodial Agreement shall hold, no adverse interest, by way of security or otherwise, in any Mortgage Loan, and hereby waives and releases any such interest which it may have in any Mortgage Loan as of the date hereof. The Mortgage Loans shall not be subject to any security interest, lien or right to set-off by Custodian or any third party claiming through Custodian, and Custodian shall not pledge, encumber, hypothecate, transfer, dispose of, or otherwise grant any third party interest in, the Mortgage Loans. Section 13. Indemnification of Custodian. (a) Except as set forth in this Section 13, neither the Custodian nor any of its directors, officers, agents or employees shall be liable to the Buyer Agent or the Sellers for any action taken or not taken by it or them hereunder other than as a result of the breach by the Custodian of its obligations hereunder, which breach was caused by negligence, lack of good faith or willful misconduct on the part of the Custodian or any of its directors, officers, agents or employees, provided that in no event shall the Custodian or any of its directors, officers, agents or employees have any liability with respect to any special, indirect, punitive or consequential damages suffered by the Buyer Agent or the Sellers. 15 (b) Each Seller, jointly and severally, agrees to indemnify and hold the Custodian and its directors, officers, agents and employees harmless against any and all liabilities, obligations, losses, damages, penalties, actions, judgments, suits, costs, expenses or disbursements of any kind or nature whatsoever, including reasonable attorney's fees, that may be imposed on, incurred by, or asserted against it or them in any way relating to or arising out of this Custodial Agreement or any action taken or not taken by it or them hereunder unless such liabilities, obligations, losses, damages, penalties, actions, judgments, suits, costs, expenses or disbursements were imposed on, incurred by or asserted against the Custodian because of the breach by the Custodian of its obligations hereunder, which breach was caused by negligence, lack of good faith or willful misconduct on the part of the Custodian or any of its directors, officers, agents or employees. The foregoing indemnification shall survive any resignation or removal of the Custodian or the termination or assignment of this Custodial Agreement. (c) In the event that the Custodian fails to produce a Mortgage Note, Assignment of Mortgage or any other document related to a Mortgage Loan that was in its possession pursuant to Section 2 within two (2) Business Days after required or requested by the Sellers or Buyer Agent, and provided that (i) Custodian previously delivered to the Buyer Agent a Mortgage Loan Schedule and Exception Report which did not list such document as an Exception on the related Purchase Date; (ii) such document is not outstanding pursuant to a Request for Release and Receipt in the form annexed hereto as Annex 5-A; and (iii) such document was held by the Custodian on behalf of a Seller or the Buyer Agent, as applicable, (a "Custodial Delivery Failure"), then the Custodian shall (a) with respect to any missing Mortgage Note, with respect to which a Custodial Delivery Failure has occurred and has continued in excess of three (3) Business Days, promptly deliver to the Buyer Agent or Sellers upon request, a Lost Note Affidavit in the form of Annex 9 hereto unless the original Mortgage Note shall have been delivered prior to such time and (b) with respect to any missing document related to such Mortgage Loan, including but not limited to a missing Mortgage Note, (1) indemnify the applicable Seller or the Buyer Agent in accordance with the succeeding paragraph of this Section 13 and, (2) at the Buyer Agent's option, at any time the long term obligations of the Custodian are rated below the second highest rating category of Moody's Investors Service, Inc. or Standard & Poor's Ratings Services, a division of The McGraw-Hill Companies, Inc., obtain and maintain an insurance bond in the name of the Buyer Agent, and its successors in interest and assigns, insuring against any losses associated with the loss of such document, in an amount equal to the then outstanding principal balance of the related Mortgage Loan or such lesser amount requested by the Buyer Agent in the Buyer Agent's sole discretion. (d) The Custodian agrees to indemnify and hold the Buyer Agent and each Seller, and their respective designees harmless against any and all liabilities, obligations, losses, damages, penalties, actions, judgments, suits, costs, expenses or disbursements of any kind or nature whatsoever, including reasonable attorney's fees, that may be imposed on, incurred by, or asserted against it or them in any way relating to or arising out of a Custodial Delivery Failure or the Custodian's negligence, lack of good faith or willful misconduct. The foregoing indemnification shall survive any termination or assignment of this Custodial Agreement. 16 Section 14. Reliance of Custodian. (a) In the absence of bad faith on the part of the Custodian, the Custodian may conclusively rely, as to the truth of the statements and the correctness of the opinions expressed therein, upon any request, instruction certificate, opinion or other document furnished to the Custodian, reasonably believed by the Custodian to have been signed or presented by an Authorized Representative and conforming in form only to the requirements of this Custodial Agreement; but in the case of any certificate or opinion which by any provision hereof is specifically required to be furnished to the Custodian, the Custodian shall be under a duty to examine the same in accordance with the requirements of this Custodial Agreement. (b) In the absence of bad faith on the part of the Custodian, the Custodian may conclusively rely upon any resolution, certificate, statement, instrument, opinion, report, notice, request, direction, consent, order, bond, debenture, coupon or other paper or document reasonably believed by the Custodian to be genuine and to have been signed or presented by an Authorized Representative. (c) In the absence of bad faith on the part of the Custodian, the Custodian shall be entitled to conclusively rely in good faith upon the written direction, order, instruction or other communication from the Buyer Agent or a Seller reasonably believed by the Custodian to be genuine and to have been signed or presented by an Authorized Representative. (d) This Section shall not be construed to limit the effect of any provision of this Custodial Agreement respecting the rights or remedies of the Custodian or any other right of the Custodian. (e) If the Custodian requests instructions from the Buyer Agent with respect to any act, action or failure to act in connection with this Custodial Agreement, Custodian shall be entitled (without incurring any liability therefor to Buyer Agent, the Sellers or any other person) to refrain from taking such action and continue to refrain from acting unless and until the Custodian shall have received written instructions from the Buyer Agent with respect to a Mortgage File. (f) The Custodian may consult with counsel and the advice or any opinion of counsel shall be full and complete authorization and protection in respect of any action taken or omitted by it hereunder in good faith and in accordance with such advice or opinion of counsel. (g) None of the provisions of this Custodial Agreement shall require the Custodian to expend or risk its own funds or otherwise to incur any liability, financial or otherwise, in the performance of any of its duties hereunder, or in the exercise of any of its rights or powers if it shall have reasonable grounds for believing that repayment of such funds or indemnity satisfactory to it against such risk or liability is not assured to it. (h) Any corporation into which the Custodian may be merged or converted or with which it may be consolidated, or any corporation resulting from any merger, conversion or consolidation to which the Custodian shall be a party, or any corporation succeeding to the business of the Custodian shall be the successor of the Custodian hereunder without the execution or filing of any paper with any party hereto or any further act on the part of any of the 17 parties hereto except where an instrument of transfer or assignment is required by law to effect such succession, anything herein to the contrary notwithstanding. Section 15. Term of Custodial Agreement. Promptly after written notice from the Buyer Agent of the termination of the Repurchase Agreement and payment in full of all amounts owing to the Buyer Agent thereunder and under the Note, the Custodian shall deliver all documents remaining in the Mortgage Files to the applicable Seller, and this Custodial Agreement shall thereupon terminate. Section 16. Notices. All demands, notices and communications hereunder shall be in writing and shall be deemed to have been duly given when received by the recipient party at the address shown on its signature page hereto, or at such other addresses as may hereafter be furnished to each of the other parties by like notice. Any such demand, notice or communication hereunder shall be deemed to have been received on the date delivered to or received at the premises of the addressee. The Custodian's office is located at the address set forth on its signature page hereto, and the Custodian shall notify the Buyer Agent and the Sellers if such address should change. Section 17. Governing Law. This Custodial Agreement shall be construed in accordance with the laws of the State of New York, and the obligations, rights, and remedies of the parties hereunder shall be determined in accordance with such laws without regard to the conflict of laws doctrine applied in such state (other than Section 5-1401 of the New York General Obligations Law). Section 18. Authorized Representatives. Each individual designated as an authorized representative of the Buyer Agent or its successors or assigns, the Sellers and the Custodian, respectively (an "Authorized Representative"), is authorized to give and receive notices, requests and instructions and to deliver certificates and documents in connection with this Custodial Agreement on behalf of the Buyer Agent, the Sellers and the Custodian, as the case may be, and the specimen signature for each such Authorized Representative, initially authorized hereunder, is set forth on Annexes 6, 7 and 8 hereof, respectively. From time to time, the Buyer Agent, the Sellers and the Custodian or their respective successors or permitted assigns may, by delivering to the others a revised annex, change the information previously given pursuant to this Section 18, but each of the parties hereto shall be entitled to rely conclusively on the then current annex until receipt of a superseding annex. Section 19. Amendment. This Custodial Agreement may be amended from time to time by written agreement signed by the Sellers, the Buyer Agent and the Custodian. 18 Section 20. Cumulative Rights. The rights, powers and remedies of the Custodian and the Buyer Agent under this Custodial Agreement shall be in addition to all rights, powers and remedies given to the Custodian and the Buyer Agent by virtue of any statute or rule of law, the Repurchase Agreement or any other agreement, all of which rights, powers and remedies shall be cumulative and may be exercised successively or concurrently without impairing the Buyer Agent's security interest in the Purchased Items. Section 21. Binding Upon Successors. All rights of the Custodian and the Buyer Agent under this Custodial Agreement shall inure to the benefit of the Custodian and the Buyer Agent and their successors and permitted assigns, and all obligations of each Seller shall bind its successors and assigns. Section 22. Entire Agreement; Severability. This Custodial Agreement contains the entire agreement with respect to the Purchased Items among the Custodian, the Buyer Agent and the Sellers; provided, however, that this Custodial Agreement, together with the other Repurchase Documents, contains the entire agreement with respect to the Purchased Items among the Buyer Agent and the Sellers. If any of the provisions of this Custodial Agreement shall be held invalid or unenforceable, this Custodial Agreement shall be construed as if not containing such provisions, and the rights and obligations of the parties hereto shall be construed and enforced accordingly between the Buyer Agent and the Sellers, and this Custodial Agreement contains the entire Agreement with respect to the rights and obligations of the Custodian. Section 23. Execution In Counterparts. This Custodial Agreement may be executed in counterparts, each of which when so executed shall be deemed to be an original and all of which when taken together shall constitute one and the same agreement. Section 24. Tax Reports. The Custodian shall not be responsible for the preparation or filing of any reports or returns relating to federal, state or local income taxes with respect to this Custodial Agreement, other than in respect of the Custodian's compensation or for reimbursement of expenses. Section 25. Pledging of the Mortgage Loans by the Buyer Agent. In connection with a pledge of the Mortgage Loans as collateral for an obligation of the Buyer Agent, the Buyer Agent may pledge its interest in the Mortgage Files held by the Custodian for the benefit of the Buyer Agent from time to time by delivering written notice to the Custodian stating that the buyer Agent has pledged its interest in the identified Mortgage Loans and Mortgage Files, and the identity of the party to whom the Mortgage Loans have been pledged (such party, the "Pledgee"). Upon receipt of such notice from the Buyer Agent, the Custodian shall mark its records to reflect the pledge of the Mortgage Loans by the Buyer Agent 19 to the Pledgee. The Custodian's records shall reflect the pledge of the Mortgage Loans by the Buyer Agent to the Pledgee until such time as the Custodian receives written instructions from the Buyer Agent and acknowledged by the Pledgee that the Mortgage Loans are no longer pledged by the Buyer Agent to the Pledgee, at which time the Custodian shall change its records to reflect the release of the pledge of the Mortgage Loans and that the Custodian is holding the Mortgage Loans as custodian for, and for the benefit of, the Buyer Agent; provided, however that such pledge shall not affect the right of the Custodian to rely on instructions from the Buyer Agent hereunder. Section 26. Transmission of Mortgage Files. Prior to any shipment of any Mortgage Files hereunder, the applicable Seller shall deliver to the Custodian written instructions as to the method of shipment and the shipper that the Custodian is to utilize in connection with the transmission of such Mortgage Files or other loan documents in the performance of the Custodian's duties hereunder. Such Seller shall arrange for the provision of such services at its sole cost and expense (or, at the Custodian's option, reimburse the Custodian for all costs and expenses incurred by the Custodian consistent with such instructions) and will maintain such insurance against loss or damage to the Mortgage Files or other loan documents as such Seller may deem appropriate. It is expressly agreed that in no event shall the Custodian have any liability for any losses or damages to any person, including without limitation, any Seller, arising out of actions of the Custodian consistent with the instructions of a Seller. In the event that the Custodian does not receive such written instructions, the Custodian shall be authorized and shall be indemnified as provided herein to utilize a nationally recognized courier service. Section 27. Submission To Jurisdiction; Waivers. Each Seller, the Buyer Agent and the Custodian hereby irrevocably and unconditionally: (a) SUBMITS FOR ITSELF AND ITS PROPERTY IN ANY LEGAL ACTION OR PROCEEDING RELATING TO THIS CUSTODIAL AGREEMENT, THE REPURCHASE AGREEMENT AND THE OTHER REPURCHASE DOCUMENTS, OR FOR RECOGNITION AND ENFORCEMENT OF ANY JUDGMENT IN RESPECT THEREOF, TO THE NON-EXCLUSIVE GENERAL JURISDICTION OF THE COURTS OF THE STATE OF NEW YORK, THE FEDERAL COURTS OF THE UNITED STATES OF AMERICA FOR THE SOUTHERN DISTRICT OF NEW YORK, AND APPELLATE COURTS FROM ANY THEREOF; (b) CONSENTS THAT ANY SUCH ACTION OR PROCEEDING MAY BE BROUGHT IN SUCH COURTS AND, TO THE EXTENT PERMITTED BY LAW, WAIVES ANY OBJECTION THAT IT MAY NOW OR HEREAFTER HAVE TO THE VENUE OF ANY SUCH ACTION OR PROCEEDING IN ANY SUCH COURT OR THAT SUCH ACTION OR PROCEEDING WAS BROUGHT IN AN INCONVENIENT COURT AND AGREES NOT TO PLEAD OR CLAIM THE SAME; (c) AGREES THAT SERVICE OF PROCESS IN ANY SUCH ACTION OR PROCEEDING MAY BE EFFECTED BY MAILING A COPY THEREOF BY REGISTERED 20 OR CERTIFIED MAIL (OR ANY SUBSTANTIALLY SIMILAR FORM OF MAIL), POSTAGE PREPAID, TO ITS ADDRESS SET FORTH UNDER ITS SIGNATURE BELOW OR AT SUCH OTHER ADDRESS OF WHICH THE BUYER AGENT SHALL HAVE BEEN NOTIFIED; AND (d) AGREES THAT NOTHING HEREIN SHALL AFFECT THE RIGHT TO EFFECT SERVICE OF PROCESS IN ANY OTHER MANNER PERMITTED BY LAW OR SHALL LIMIT THE RIGHT TO SUE IN ANY OTHER JURISDICTION. Section 28. Waiver of Jury Trial. Each Seller, the Buyer Agent and the Custodian hereby waive trial by jury in any judicial proceeding involving, directly or indirectly, any matter (whether sounding in tort, contract or otherwise) in any way arising out of, related to, or connected with this Custodial Agreement or the relationships established hereunder. Section 29. Substitution. This Custodial Agreement substitutes and replaces in its entirety the Existing Custodial Agreement. All Mortgage Files that are held by the Custodian pursuant to the Existing Custodial Agreement immediately prior to the execution and delivery of this Custodial Agreement shall, as of the execution and delivery hereof, be deemed, mutatis mutandis, to be held under this Custodial Agreement. [SIGNATURES FOLLOW] 21 IN WITNESS WHEREOF, this Custodial Agreement was duly executed by the parties hereto as of the day and year first above written. SELLERS AMERICAN HOME MORTGAGE CORP. By: /s/ Alan B. Horn ----------------- Name: Alan B. Horn Title: Executive Vice President, General Counsel and Secretary Address for Notices: ------------------- 538 Broadhollow Road Melville, New York 11747 Attention: Alan B. Horn, General Counsel Facsimile: (800) 209-7276 Telephone: (516) 396-7703 AMERICAN HOME MORTGAGE INVESTMENT CORP. By: /s/ Alan B. Horn ---------------- Name: Alan B. Horn Title: Executive Vice President, General Counsel and Secretary Address for Notices: ------------------- 538 Broadhollow Road Melville, New York 11747 Attention: Alan B. Horn, General Counsel Facsimile: (800) 209-7276 Telephone: (516) 396-7703 AMERICAN HOME MORTGAGE HOLDINGS, INC. By: /s/ Alan B. Horn ------------------ Name: Alan B. Horn Title: Executive Vice President, General Counsel and Secretary Address for Notices: ------------------- 538 Broadhollow Road Melville, New York 11747 Attention: Alan B. Horn, General Counsel Facsimile: (800) 209-7276 Telephone: (516) 396-7703 AMERICAN HOME MORTGAGE ACCEPTANCE, INC. By: /s/ Alan B. Horn ------------------ Name: Alan B. Horn Title: Executive Vice President, General Counsel and Secretary Address for Notices: ------------------- 538 Broadhollow Road Melville, New York 11747 Attention: Alan B. Horn, General Counsel Facsimile: (800) 209-7276 Telephone: (516) 396-7703 AMERICAN HOME MORTGAGE SERVICING, INC. By: /s/ Alan B. Horn ------------------ Name: Alan B. Horn Title: Executive Vice President, General Counsel and Secretary Address for Notices: ------------------- 538 Broadhollow Road Melville, New York 11747 Attention: Alan B. Horn, General Counsel Facsimile: (800) 209-7276 Telephone: (516) 396-7703 With a copy to: -------------- 4600 Regent Blvd. Suite 200 Irving, Texas 75063 Attention: David Friedman BUYER AGENT ----------- MORGAN STANLEY BANK By: /s/ Andrew B. Neuberger ------------------------ Name: Andrew B. Neuberger Title: Vice President Address for Notices: ------------------- 2500 Lake Park Boulevard West Valley City, Utah 84120 Attention: Richard Felix with a copy to: 1221 Avenue of the Americas, 27th Floor New York, New York 10020 Attention: Paul Najarian Telecopier No.: (212) 507-4780 Telephone No.: (212) 762-6397 CUSTODIAN --------- DEUTSCHE BANK NATIONAL TRUST COMPANY By: /s/ Norma L. Catone ------------------- Name: Norma L. Catone Title: Vice President By: /s/ Andrew Hays --------------- Name: Andrew Hays Title: Associate Address for Notices: ------------------- 1761 East St. Andrew Place Santa Ana, California 92705 Attention: Mortgage Custody - AH05BC Telecopier No.: (714) 247-6035 Telephone No.: (714) 247-6000