fixed the file parsing to only look at image files