Change check to filepath to || instead of && for .html or .htm.
Remove unnecessary code that was commented out.