Validate filepath