For good reason, we're celebrating the release of five Iranian-Americans freed on Saturday by the government of Iran. But they should never have been in prison to begin with.

Washington Post journalist Jason Rezaian had the muscle of American media behind him, and it still took 18 months to get free. Christian pastor Saeed Abedini had been in prison since 2012 for the "crime" of organizing Christian churches in Iran.

They were convicted by secret courts. The charges and the evidence against them were not detailed. Both cases teach us one vital lesson: A free press, the free expression of religion and an open court system are vital to a just society.

Today's news aside, it has been a rotten couple of weeks for journalists just doing their jobs around the world: We learned in a Facebook post this week about a popular radio journalist, Mohamed Ibrahim Waiss, arrested in Djibouti. His radio station, the voice of Djibouti, published a tweet, photo and reports detailing the arrest:

Waiss was detained and tortured, deprived of food and forced to turn over access to his Facebook account, according to the voice of Djibouti. Authorities are now running his Facebook account and continue to prevent him from eating.

Press freedom has been under attack elsewhere, too. The Committee to Protect Journalists reported this week that three journalists and a journalism advocate were given a three-year prison sentence in Egypt. Their charge: "publishing false news" and having an association with the Muslim Brotherhood, which is banned. Two of the journalists were staffers at news organizations; the website El-Shaab el-Jadeed and the independent newspaper Tahir. Another journalist was a freelancer, and the advocate worked for an electronic media syndicate that supports and trains Egyptian journalists.

VICE News journalist Mohammed Ismael Rasool had been in jail for months when Turkish authorities finally released him on bail earlier this month. They have yet to drop terrorism charges against Rasool, which are based on his coming into "close contact with Kurdistan Workers’ Party militants" without government approval — approval they would never grant in the first place.

Rasool and his colleagues were detained in Southeast Turkey, "where they were filming clashes between Turkish security forces and Kurdish militants,” according to Reuters. When a Belgian reporter asked about Rasool, Turkish authorities threatened to come after him as well, according to VICE.

Turkey has become increasingly difficult for journalists. We hear those stories frequently in Poynter seminars. I have worked with Syrian journalists who have fled into South Turkey where they are still living while still trying to report on the war going on in Syria. Late last year we learned of the murder of journalists who worked for RBSS (Raqqa is Being Slaughtered Silently.) This group of a dozen or so citizen journalists took it upon themselves to document the Islamic State killings in Raqqa, a city in North Syria. In my Poynter seminars I have taught lawyers, a pharmacist, a filmmaker and a school teacher who never aimed to be journalists but now find themselves reporting in Syria because they believe somebody has to reveal what's going on.

They all do so at great risk. Every one of them admitted to me they suffer from PTSD, that they suffer constant nightmares and have little hope. The citizens have to do the work because there are so few journalists on the ground. At least 85 journalists have died covering the Syrian conflict, according to RBSS.

The Committee to Protect Journalists says that, at last count, there are 198 journalists in jail cells around the world. Most of them are people you have never and will not likely hear about. They don’t work for big organizations like The Washington Post, and President Obama cannot raise their names at high-level meetings during nuclear deals. Half of those in prison around the globe work for websites. A third are freelancers, which makes them even more vulnerable. China is holding 44 journalists, more than any other country. Most of the charges revolve around the journalist publishing “anti-state” messages.

The single best thing journalists can do about all of this is to report aggressively. When government organizations anywhere try to make it harder for citizens to discover and report what should be the people’s business, expose it. Pry open government records. Maybe you need to learn how; IRE is great at that. The Reporters Committee for Freedom of the Press has tons of practical tools.

Earlier this year, Poynter columnist Kelly Hinchcliffe collected 50 stories from 2015 that were build on open records. As we breathe a sigh of relief over Jason Rezaian’s freedom, read them over. A heck of a lot of these stories would have gotten their authors jailed in much of the rest of the world.

Iran’s release of a journalist is no gift. We celebrate Jason Rezaian’s release and the Post’s resolve, but when governments arrest journalists there is usually a reason. They have something to hide. They fear the truth.