added file extension validation