added validation for excel and pdf