Fix for the file extension checking