Exhibit 10(m)

SIXTH AMENDMENT TO
CREDIT AND SECURITY AGREEMENT

This SIXTH AMENDMENT TO CREDIT AND SECURITY AGREEMENT (this “Sixth Amendment”)
is entered into as of December 29, 2016, among MFRI, INC., a Delaware
corporation (the “Company”), MIDWESCO FILTER RESOURCES, INC., a Delaware
corporation (“Midwesco”), PERMA-PIPE, INC., a Delaware corporation
(“Perma-Pipe”), TC NILES CORPORATION, a Delaware corporation (“TC Niles”), TDC
FILTER MANUFACTURING, INC., a Delaware corporation (“TDC”), MM NILES
CORPORATION, a Delaware corporation (“MM Niles”), and PERMA-PIPE CANADA, INC., a
Delaware corporation (“Perma-Pipe Canada”) (each of the Company, Midwesco,
Perma-Pipe, TC Niles, TDC, MM Niles, and Perma-Pipe Canada may be referred to
herein individually, as a “US Borrower” and collectively, as “US Borrowers”),
PERMA-PIPE CANADA HOLDINGS LTD., an Alberta corporation (“PP Canada Holding”)
and PERMA-PIPE CANADA LTD., an Alberta corporation (“PP Canada Operating”) (each
of PP Canada Holding and PP Canada Operating may be referred to herein
individually as a “Canadian Borrower” and collectively “Canadian Borrowers”) and
BANK OF MONTREAL, as lender (“Lender”). US Borrowers and Canadian Borrowers may
be referred to herein individually, as a “Borrower” and collectively as
“Borrowers”
WHEREAS, Lender (or its successor-in-interest) and Borrowers entered into a
certain Credit and Security Agreement dated September 24, 2014 (as amended by
that certain Consent and First Amendment to Credit and Security Agreement, dated
as of February 5, 2015 and that certain Limited Waiver and Second Amendment to
Credit and Security Agreement dated as of April 30, 2015, that certain Consent
and Third Amendment to Credit and Security Agreement dated as of January 29,
2016 and that certain Fourth Amendment to Credit and Security Agreement dated as
of February 29, 2016 and that certain Fifth Amendment to Credit and Security
Agreement dated as of October 25, 2016, and as hereby and further amended,
restated, supplemented, and/or modified from time to time, the “Credit
Agreement”); and
WHEREAS, Lender and Borrowers desire to amend certain provisions of the Credit
Agreement pursuant to the terms hereof.
NOW, THEREFORE, in consideration of the premises, the mutual covenants and
agreements herein contained, and any extension of credit heretofore, now or
hereafter made Lender to Borrower, the parties hereto agree as follows:
1.Definitions. All capitalized terms used herein without definition shall have
the meanings contained in the Credit Agreement.
2.Amendments to Credit Agreement.
(a)    Amended Definitions. The definitions of “Applicable Margin,” “Fixed
Charge Trigger Period,” and “Reporting Trigger Period” set forth in Section 1.01
of the Credit Agreement are hereby amended in their entirety and restated as
follows:
“Applicable Margin” means with respect to any Type of Loan or the Unused Fee,
the percentages per annum set forth below, as based upon the Average
Availability for the immediately preceding fiscal quarter:

--------------------------------------------------------------------------------

Level
Average Availability
Eurodollar Rate Revolving Loans and Bankers’ Acceptances
Base Rate Revolving Loans and Canadian Prime Rate Loans
Unused Line Fee
I
>$7,000,000
2.50%
0.75%
0.20%
II
>$4,000,000 but < $7,000,000
2.75%
1.00%
0.20%
III
<$4,000,000
3.00%
1.25%
0.20%

From the Sixth Amendment Effective Date until the next Adjustment Date, margins
shall be determined as if Level III were applicable. Thereafter, any increase or
decrease in the Applicable Margin resulting from a change in Average
Availability shall become effective as of each Adjustment Date based upon
Average Availability for the immediately preceding fiscal quarter. Average
Availability shall be calculated by the Lender based on the actual daily
Availability calculated from Borrowing Base Certificates delivered from time to
time pursuant to Section 7.02(a) (as the same may be adjusted as set forth
therein). If any Borrowing Base Certificate (including any required financial
information in support thereof) is not received by the Lender by the date
required pursuant to Section 7.02(a), then the Applicable Margin shall be
determined as if the Average Availability for the immediately preceding fiscal
quarter is at Level III until such time as such Borrowing Base Certificate and
supporting information is received.
“Fixed Charge Trigger Period” means the period (a) commencing on the day that
the sum of US Availability and Eligible Cash or Cash Equivalents is less than
(I) for periods after February 28, 2017 (i) $3,000,000 for a period of five (5)
consecutive Business Days or (ii) $2,000,000 as of the end of any Business Day,
(II) only for the period from the Sixth Amendment Effective Date until
January 31, 2017, $1,000,000 as of the end of any Business Day, or (III) only
for the period from February 1, 2017 to February 28, 2017, $2,000,000 as of the
end of any Business Day, and (b) continuing until the date that during the
previous forty-five (45) consecutive days, the sum of US Availability and
Eligible Cash or Cash Equivalents has been greater than $3,000,000 at all times
during such period. The foregoing notwithstanding, a Fixed Charge Trigger Period
shall not commence and, if a Fixed Charge Trigger has commenced, shall be
terminated if there are no Revolving Loans outstanding and all outstanding
Letters of Credit are Cash Collateralized.
“Reporting Trigger Period” means the period (a) commencing on the date that
(i) an Event of Default occurs and is continuing, (ii) the sum of US
Availability plus Eligible Cash or Cash Equivalents is less than (x) $3,000,000,
for a period of three (3) consecutive Business Days, or (y) $2,000,000
($1,000,000 for periods prior to March 1, 2017) at the end of any Business Day
and (b) continuing until the date that during the previous forty-five (45)
consecutive days, (i) no Event of Default has existed and (ii) the sum of US
Availability plus Eligible Cash or Cash Equivalents has been greater than
$3,000,000 at all times during such period. The foregoing notwithstanding, a (x)
Reporting Trigger Period shall not commence if there are no Revolving Loans
outstanding and all outstanding Letters of Credit are Cash Collateralized and
(y) for periods prior to March 1, 2017, a Reporting Trigger Period shall not
commence as a result of an event described in clause (ii)(x) of the preceeding
sentence.
(b)    New Definitions. The definitions of “PrimeRevenue Supplier Agreement”,
“Sixth Amendment” and “Sixth Amendment Effective Date” are hereby inserted in
Section 1.01 of the Credit Agreement in appropriate alphabetical order as
follows:
“2011 PrimeRevenue Online Supplier Agreement” means that certain Online Supplier
Agreement dated as of December 16, 2016 between PrimeRevenue, Inc.
(“PrimeRevenue”) and PP Canada Operating, as such agreement may be amended,
supplemented or modified from time to time, through which the “Finance

--------------------------------------------------------------------------------

Institution” (as defined therein) is permitted to purchase Accounts owed to PP
Canada on which PrimeRevenue is the Account Debtor.”
“Sixth Amendment” means that Sixth Amendment to Credit and Security Agreement
dated as of December 29, 2016 by and among Borrowers, Lender and Retiring
Lender.
“Sixth Amendment Effective Date” shall have the meaning contained in Section 5
of the Sixth Amendment.
3.Minimum Availability and Minimum Unsuppressed Canadian Availability.
Clause (b) of Section 8.12 is hereby deleted and the following is inserted in
its stead; the following clause (c) is hereby inserted into Section 8.12:
“8.12    Financial Covenants.
*    *    *
(b)    Minimum Availability. Permit Availability to be less than (x) $1,000,000
at any time, prior to February 1, 2017, (y) $2,000,000 at any time between and
including February 1, 2017 to February 28, 2017, and $1,000,000 at any time on
or after March 1, 2017.
(c)    Unsuppressed Canadian Availability. As long as there are any Canadian
Total Revolving Credit Outstandings, permit the amount equal to the Canadian
Borrowing Base minus Canadian Total Revolving Credit Outstandings to be less
than $500,000 at any time.
4.PrimeRevenue Supplier Agreement. The following is inserted into Article VIII
as Section 8.19:
“8.19 PrimeRevenue Supplier Agreement. Amend, supplement, modify or terminate
the PrimeRevenue Supplier Agreement without, in either case, first obtaining
Lender’s prior written consent, which shall not be unreasonably withheld.
5.Amendment Fee. In order to induce Lender to enter into this Sixth Amendment,
Borrowers agree to pay Lender an amendment fee in the amount of $30,000. Said
amendment fee shall be due and payable on the date of the Sixth Amendment and,
upon payment, shall be fully earned and nonrefundable.
6.Consent to PP Supplier Agreement. Lender hereby consents to PP Canada entering
into the PrimeRevenue Supplier Agreement in the form delivered to Lender on or
prior to the date hereof. Borrower acknowledges that Accounts sold by PP Canada
to the applicable financial institutions shall not constitute Eligible Accounts.
7.Conditions Precedent. This Sixth Amendment shall become effective as of the
date hereof upon satisfaction of each of the following conditions precedent:
(a)Borrowers, Lender and Retiring Lender shall have executed and delivered to
each other this Sixth Amendment;
(b)Simultaneously with the closing of this Sixth Amendment, Borrowers shall have
paid to Lender all fees, expenses or other amounts due Lender which fees,
expenses or other amounts are due or become due on or prior to the Sixth
Amendment Effective Date; and
(c)Borrowers shall have paid the amendment fee referred to in Section 5 above.
The date on which all of the above conditions precedent have been satisfied or
waived is hereinafter referred to as the “Sixth Amendment Effective Date”.

--------------------------------------------------------------------------------

8.Post-Close Covenant. Within sixty (60) days of the Sixth Amendment Effective
Date, Borrowers shall deliver to Lender a Landlord Waiver, in form and substance
reasonably acceptable to Lender, for the premises commonly known as 6410 Howard
Street, Niles, Illinois.
9.Confirmation of Obligations; Release.
(a)    The Borrowers hereby confirm that the Borrowers are indebted to Lender
for the Loan Obligations, Letter of Credit Obligations and other Obligations as
set forth in the Credit Agreement and the other Loan Documents. Each Borrower
further acknowledges and agrees that as of the date hereof, it has no claim,
defense or set-off right against Lender of any nature whatsoever, whether
sounding in tort, contract or otherwise, and has no claim, defense or set-off of
any nature whatsoever to the enforcement by Lender of the full amount of the
Loans and other Obligations of the Loan Parties under the Credit Agreement and
the other Loan Documents.
(b)    Notwithstanding the foregoing, to the extent that any claim, cause of
action, defense or set-off against Lender or its enforcement of the Credit
Agreement, the Revolving Loan Note, or any other Loan Document, of any nature
whatsoever, known or unknown, fixed or contingent, does nonetheless exist or may
exist on the date hereof, in consideration of Lender’s entering into this Sixth
Amendment, each Borrower irrevocably and unconditionally waives and releases
fully each and every such claim, cause of action, defense and set-off which
exists or may exist on the date hereof.
10.Governing Law. This Sixth Amendment shall be governed by, and construed in
accordance with, the laws of the State of Illinois, without regard to the
principles thereof relating to conflict of laws.
11.Execution in Counterparts. This Sixth Amendment may be executed in any number
of separate counterparts, each of which shall, collectively and separately,
constitute one agreement. Delivery of an executed counterpart of a signature
page of this Sixth Amendment by telecopy or electronically (such as PDF) shall
be effective as delivery of a manually executed counterpart of this Sixth
Amendment.
Continuing Effect. Except as otherwise specifically set out herein, the
provisions of the Credit Agreement shall remain in full force and effect.

(Signature Pages Follow)

--------------------------------------------------------------------------------

(Signature Page to Sixth Amendment to Credit and Security Agreement)

IN WITNESS WHEREOF, the parties hereto have caused this Sixth Amendment to be
duly executed as of the date first above written.

U.S. BORROWERS:
 
 
MFRI, INC., MIDWESCO FILTER RESOURCES, INC., PERMA-PIPE, INC., TC NILES
CORPORATION, TDC FILTER MANUFACTURING, INC., MM NILES CORPORATION and PERMA-PIPE
CANADA, INC.
 
By:    /s/ Karl J. Schmidt
 
Name:    Karl J. Schmidt
 
Title:    Vice President and Chief Financial Officer
 
 
CANADIAN. BORROWERS:
 
PERMA-PIPE CANADA HOLDINGS LTD.
 
By:    /s/ Karl J. Schmidt
 
Name:    Karl J. Schmidt
 
Title:    Vice President and Chief Financial Officer
 
 
 
PERMA-PIPE CANADA, LTD.
 
By:    /s/ Karl J. Schmidt
 
Name:    Karl J. Schmidt
 
Title:    Vice President and Chief Financial Officer

LENDER:
 
 
BMO HARRIS BANK, N.A.
 
By:    /s/ Terrence McKenna, Jr.
 
Name:    Terrence McKenna, Jr.
 
Title:    Vice President
 
 
 
BANK OF MONTREAL (Toronto Branch)
 
By: /s/ Helen Alvarez-Hernandez
 
Name: Helen Alvarez-Hernandez
 
Title: Director