Validate path existence at middleware creation