Dow Jones closes with gains while S&P, Nasdaq finish lower