Exhibit 10.5Q AMENDMENT NO. 16 TO LOAN AND SECURITY AGREEMENT AMENDMENT NO. 16, dated as of January 20, 1998 (this "Amendment") to that certain Loan and Security Agreement dated as of March 5, 1993, as amended by Amendment Nos. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14 and 15 (collectively, the "Loan Agreement") among THE PENN TRAFFIC COMPANY ("Penn Traffic"), DAIRY DELL, BIG M SUPERMARKETS, INC. and PENNY CURTISS BAKING COMPANY, INC. (individually, each a "Borrower" and collectively, the "Borrowers"), the Lenders listed therein (collectively, the "Lenders") and FLEET BANK, N.A. (as successor to NatWest USA Credit Corp.), as Agent for the Lenders (in such capacity, the "Agent"), is made by, between and among the Borrowers, the Agent, and the Lenders. Capitalized terms used herein, except as otherwise defined herein, shall have the meanings given to such terms in the Loan Agreement. WHEREAS, the Borrowers have advised the Agent and the Lenders that Penn Traffic and Dairy Dell propose to sell to Dean Foods Company certain assets comprising its dairy manufacturing operations based in Johnstown, Pennsylvania, for net cash proceeds of not less than $30,000,000; and WHEREAS, in connection with such proposed sale the Borrowers have requested the Agent and the Lender to amend the Loan Agreement to modify the existing covenant regarding sales of assets set forth in Section 10.5 of the Loan Agreement so as to permit such sale; and WHEREAS, the Borrowers, the Agent and the Lenders have agreed to amend the Loan Agreement pursuant to the terms and conditions set forth herein. NOW, THEREFORE, in consideration of the mutual promises, covenants and agreements hereinafter set forth, the parties hereto agree as follows: 1. Amendment to Loan Agreement. The Loan Agreement is hereby amended as of the effective date hereof as follows: Section 10.5 of the Loan Agreement is hereby amended by (i)deleting the word "and" immediately prior to clause (h), (ii) replacing the period at the end of clause (h) with a semicolon and (iii) adding the following language immediately after such semicolon "and (i) the sale by Penn Traffic of its dairy manufacturing operations based in Johnstown, Pennsylvania (including without limitation the accounts receivable, inventory, equipment, vehicles, real estate and intellectual property associated therewith) resulting in net cash proceeds, after payment of transaction costs and repayment of debt relating to the dairy manufacturing operation, of not less than $30,000,000, which net proceeds shall be applied to the Revolving Loans." 2. Representations and Warranties. As an inducement to the Agent and the Lenders to enter into this Amendment, each of the Borrowers hereby represents and warrants to the Agent and the Lenders and agrees with the Agent and the Lenders as follows: (a) It has the power and authority to enter into this Amendment and has taken all corporate action required to authorize its execution, delivery, and performance of this Amendment. This Amendment has been duly executed and delivered by it and constitutes its valid and binding obligation, enforceable against it in accordance with its terms. The execution, delivery, and performance of this Amendment will not violate its certificate of incorporation or by-laws or any agreement or legal requirements binding upon it. (b) As of the date hereof and after giving effect to the terms of this Amendment: (i) the Loan Agreement is in full force and effect and constitutes a binding obligation of the Borrowers, enforceable against the Borrowers and owing in accordance with its terms; (ii) the Obligations are due and owing by the Borrowers in accordance with their terms; and (iii) Borrowers have no defense to or setoff, counterclaim, or claim against payment of the Obligations and enforcement of the Loan Documents based upon a fact or circumstance existing or occurring on or prior to the date hereof. (c) The Obligations under the Loan Agreement as amended by this Amendment constitute "Senior Indebtedness" and "Designated Senior Indebtedness" as defined under the indentures relating to the Senior Notes and to the Subordinated Notes. 3. No Implied Amendments. Except as expressly provided herein, the Loan Agreement and the other Loan Documents are not amended or otherwise affected in any way by this Amendment. 4. Entire Agreement; Modifications; Binding Effect. This Amendment constitutes the entire agreement of the parties with respect to its subject matter and supersedes all prior oral or written understandings about such matter. Each of the Borrowers confirms that, in entering into this Amendment, it did not rely upon any agreement, representation, or warranty by the Agent or any Lender except those expressly set forth herein. No modification, rescission, waiver, release, or amendment of any provision of this Amendment may be made except by a written agreement signed by the parties hereto. The provisions of this Amendment are binding upon and inure to the benefit of the representatives, successors, and assigns of the parties hereto; provided, however, that no interest herein or obligation hereunder may be assigned by any Borrower without the prior written consent of the Required Lenders. 5. Effective Date. This Agreement shall become effective upon compliance with the conditions set forth immediately below: (i) No Event or Event of Default shall have occurred and there shall have been no material adverse change in the business or financial condition of any of the Borrowers. (ii) The Borrowers shall deliver to the Agent for the benefit of the Lenders an opinion of Borrowers' counsel in form and substance satisfactory to the Agent and its counsel (which opinion shall cover such matters as the Agent may reasonably request, including a statement that the Obligations under the Loan Agreement as amended by this Amendment constitute "Senior Indebtedness" and "Designated Senior Indebtedness" as defined under the indentures relating to the Senior Notes and to the Subordinated Notes). (iii) The Borrowers shall deliver to the Agent a certificate of the Borrowers' Chief Executive, Chief Financial Officer or Vice Chairman- Finance with respect to Section (i) above and such other instruments and documents as the Agent shall reasonably request. (iv) The Agent shall have received an original counterpart of this Amendment, duly executed and delivered by the Borrowers and the Required Lenders. 6. Counterparts. This Amendment may be executed in any number of counterparts, and by each party in separate counterparts, each of which is an original, but all of which shall together constitute one and the same agreement. 7. Governing Law. This Amendment is deemed to have been made in the State of New York and is governed by and interpreted in accordance with the laws of such state, provided that no doctrine of choice of law (except as may be applicable under the UCC with respect to the Security Interest) shall be used to apply the laws of any other state or jurisdiction.