#16 quitting redirection if any of the conditions are met