Changed the way the validation file extension is checked.