added validation for filename
add sample validation