fixed validation with uploading file