Roger Federer and Novak Djokovic booked their places in the second round of the US Open, but their respective routes took very different paths. Third-seed Federer survived an early setback before dealing out a harsh introduction into grand slam tennis to overcome India's Sumit Nagal 4-6, 6-1, 6-2, 6-4 while world No 1 and defending champion Djokovic suffered few problems in beating Spain's Roberto Carballes Baena 6-4, 6-1, 6-4. Federer, a five-time champion in New York, was uncharacteristically sluggish in his opening match, producing 19 unforced errors to drop the first set against a player ranked 190th and yet to register a win on the ATP Tour. The Swiss, 38, found his rhythm in the second set to eventually see out the match and set up a meeting with Bosnia's Damir Dzumhur. Federer's clean-cut image was replaced with a face sporting a few days worth of stubble, and the 20-time grand slam champion suggested like his facial hair, he was "rusty" against Nagal and that he was "going to clean it up for my next match". "Maybe it's not a bad thing to go through a match like this. It was very similar at Wimbledon when I dropped the first set there, as well, in the first round," said Federer, who lost a five-set epic to Djokovic in last month's final at the All England Club. "At the end you look at the last three sets, and they were good. That's encouraging." A dismal first set served as a wake-up call for Federer, who is now 62-0 in grand slam first rounds dating back to the 2003 French Open. Nagal came out swinging and even put a rare look of incredulity on the faces of those inside third-seed Federer's box. "I broke every time first game each set. That was good. I think trying to forget the first set is never sort of easy I guess in a first round, under the lights. People expect a different result. I expect something else," he said. "I just wanted to pick up my game really, start to play better. I was able to do that. That was a relief, going up 3-0 in the second set, realising that it is in my racquet, how I also felt it in the first set. "The thing is I wasn't serving consistently enough. I was hitting double-faults that usually I don't do. Also I was just hitting too many unforced errors. I was in two minds, I guess." Federer's victory saw him qualify for a record-extending 17th ATP Tour finals appearance while also bringing up his 1,224th career win. He was quick to heap praise on his unheralded opponent. "Never easy to come out and play your best. Even though it's kind of what you live for, you dream about, playing on the big stage. So I think he did that very well," Federer said. "He knows what he can bring. That's why I think he's going to have a very solid career." Federer would have noted the that top seed Djokovic had no such troubles in overcoming his first-round opponent. The Serb was feeling right at home on the Arthur Ashe Stadium, which may be bad news for anyone hoping to deny the defending champion from adding to his grand slam tally. Djokovic progressed in straight sets to set up a second-round encounter with Argentina's Juan Ignacio Londero, and said he was feeling the same vibe that carried him to a third US Open title last year. "I didn't notice any significant difference. It is cooler in terms of weather than it was last year," said Djokovic, who has won four of the last five grand slams and is bidding to become the first men's singles champion to defend his US Open title in 11 years. "I really like the conditions of the balls, the speed of the court, the weather is fantastic. You know, it's just very enjoyable."