Changed $ext to give accurate match -- matches t ot m at end of
filename