President Obama on Wednesday admitted that America's free press is "frustrating sometimes," but said in the end a free press is healthy because it helps identify real problems that need to be fixed.

"[T]here have been times where I thought the press was very unfair, and I'd open up the newspaper and say, 'What?!' and I'd start arguing," he said in answer to a question he was asked at the Young African Leaders Initiative meeting on Wednesday.

"But, there have also been times where the press investigated something, and I thought, 'You know what, this is a problem,'" he said.

He said with 2 million people in the federal government, "there are going to be times when the government is screwing up."

"And the fact that the press is there to ask questions and to expose problems does make me work harder," he said. "It focuses me."

He said other countries with a less-free press have it worse, because it's easier to quash stories and harder for governments to focus on making improvements. "That is not good for the people, and in the end, it's not good for the president, the prime minister, those in charge," Obama said.

"In the end, I'd rather have press err on the side of freedom, even if sometimes it's a little inaccurate, than to have the person who is governing the country making decisions about who's wrong and who's right and who can say what and who can publish what," Obama said. "'Cause that's the path to not just dictatorship, but it's also the path to not fixing the real problems that exist."

Despite those comments, Republicans have argued for years that Obama runs the least transparent federal government in history, and has stonewalled investigations into issues like the IRS targeting conservative groups, and the Department of Veterans Affairs delaying healthcare for veterans.

Republicans have also said that even when the press or congressional investigations do uncover problems in the government, Obama has not shown an interested in holding those responsible accountable.