Added catch to ensure file extensions are normalised to lower case.