changed suffix searching to check filename suffix not extension