Court affirms hog farm permit, but state to monitor air at others