Question: What did the pirate, Najee, catch Phillips writing a note to?
About the article "Captain Phillips (film)", section "Plot".

Candidate passages:
Richard Phillips (Tom Hanks) takes command of the MV "Maersk Alabama", an unarmed container ship from Port of Salalah in the city of Salalah in Oman, with orders to sail through the Gulf of Aden to Mombasa, round the Horn of Africa.
Wary of pirate activity off the coast of Somalia, the captain orders strict security precautions on the vessel and carries out practice drills.
During a drill, the vessel is chased by Somali pirates in two skiffs; Phillips succeeds in outrunning them when one gives up after hearing Phillips on the radio calling for immediate military air support (a bluff) and the other loses engine power while trying to gain speed under the rough water Captain Phillips created.
The next day one of the skiffs, fitted with two outboard engines, returns with four heavily armed pirates led by Abduwali Muse (Barkhad Abdi); they are carrying a ladder they had hastily welded the night before.
Despite the best efforts of Phillips and his crew, the pirates board and take control of the "Maersk Alabama", capturing Captain Phillips after he cuts the ship's engine power and tells the crew to hide in the ship's engine room.
Phillips offers Muse the contents of the ship's safe ($30,000), but, under orders from his boss (the local Somali faction leader), Muse's plan is to ransom the ship and crew in exchange for millions of dollars of insurance money from the shipping company.
A crew member manages to cut the ship's emergency power, plunging the lower decks into darkness.
As Muse attempts to search the engine room, the crew members overpower him.
Negotiating with the other three pirates, one with badly injured feet, the crewmen arrange to trade Phillips for Muse and the ship's lifeboat.
The pirates force Phillips onto the lifeboat and launch it, intending to hold the captain for ransom.
As the lifeboat heads for the shore, tensions flare between the pirates as they run low on the herb stimulant khat, lose contact with their mother ship, and are later intercepted by the U.S. Navy destroyer .
Once additional U.S. Navy ships arrive, Phillips attempts to negotiate with Muse, who asserts that he has come too far and will not surrender.
In the meantime, the "Bainbridge"s captain Frank Castellano (Yul Vazquez) is ordered to prevent the pirates from reaching the mainland by whatever means necessary.
That night, Phillips is able to escape and swims towards the ships.
The navy cannot identify the swimmer as Phillips, and therefore they take no action.
The pirates fire shots at him; he swims back to the lifeboat.
The further agitated pirates are also unaware that a SEAL team has parachuted in to intervene.
While three SEAL marksmen get into positions to fire a simultaneous shot at each of the pirates on the lifeboat, Castellano and the SEALs continue to try to negotiate with the pirates, eventually taking the lifeboat under tow.
Eventually, Muse agrees to board the "Bainbridge", believing he will join his clan elders in negotiating Phillips's ransom.
In the lifeboat, one of the more agitated pirates, Najee, catches Phillips writing a goodbye note to his wife.
When he tries to take the note away, Phillips attacks Najee, but is quickly restrained and beaten.
Najee decides to take full control; the pirates tie Phillips up and blindfold him, and the "Bainbridge" crew stops the tow.
As Phillips is about to be executed, the three SEAL marksmen finally get three clear shots and simultaneously kill the pirates.
On board the Bainbridge, Muse is taken into custody and arrested for piracy.
Phillips is rescued and treated.
He is in shock and disoriented, but he thanks the rescue team for saving his life.
Columbia Pictures optioned the book and acquired the life rights to Phillips in spring 2009.
In March 2011, it was announced that Barkhad Abdi would star as the lead Somali pirate, Tom Hanks would star as Phillips and Faysal Ahmed as Najee in a Columbia film based on the hijacking and Phillips's book, scripted by Billy Ray, and produced by the team behind "The Social Network".
The film, entitled "Captain Phillips", was released in October 11, 2013 to widespread critical acclaim. 
Following the hijacking, Phillips published a book titled "A Captain's Duty: Somali Pirates, Navy SEALS, and Dangerous Days at Sea".
Columbia Pictures optioned the book and acquired the film rights in spring 2010.
In March 2011, it was announced that Tom Hanks would star as Phillips, Barkhad Abdi as Abduwali Muse and Faysal Ahmed as Najee in a Sony Pictures film based on the hijacking and Phillips' book, scripted by Billy Ray, and produced by the team behind "The Social Network".
The film, entitled "Captain Phillips", was released on October 11, 2013 and had its premiere showing at the 2013 New York Film Festival.
In an interview on the set of "Captain Phillips" for "New York Daily News", Phillips describes his devotion to his crew, his feeling of success as a captain and his eagerness to get back to sea.
"My crew were now safe, because the pirates lost their ladder and boat when they boarded the Maersk Alabama, so they couldn't get back onboard," says Phillips.
"For me it was really a relief—my crew and ship were safe."
Phillips also added, "I never lost hope for myself, but I didn't see a good ending coming out of it."
Phillips commented in his interview that the rendition of the events was accurate, adding, "When I met him Hanks I told him if he's going to play me he's going to have to put on a little weight and get a little better-looking and he did neither.
"Since the release of "Captain Phillips", there has been controversy over its portrayal of Phillips, with several crew members claiming that he was not the hero presented in the film.
Phillips said to CNN's Drew Griffin in 2010 and in a court deposition in 2013 that he ignored the numerous warnings that urged him to go farther out to sea.
When asked in 2013 why he decided not to take the ship farther offshore, Phillips testified, "I don't believe 600 miles would make you safe.
I didn't believe 1,200 miles would make you safe.
As I told the crew, it would be a matter of when, not if... We were always in this area.
"Phillips returned to sea fourteen months after the pirate attack. 
 "Najee's Theme" (1986, EMI/Capitol) "Day by Day" (October 1988, Capitol) "Tokyo Blue" (February 1990, Capitol) "Just an Illusion" (June 1992, Capitol) "Live At The Greek" with Stanley Clarke, Larry Carlton and Billy Cobham (July 1994, Sony) "Share my World" (October 1994, Capitol) "Najee Plays Songs from the Key of Life: A Tribute To Stevie Wonder" (November 1995, Capitol) "Best of Najee" (November 1998 Blue Note/Capitol) "Morning Tenderness" (November 1998, Polygram) "Love Songs" (2000) "Embrace October" (2003, Encoded Music) "My Point of View" (2005, Heads Up) "Rising Sun" (2007, Heads Up) "Mind Over Matter" (2009, Heads Up) "The Smooth Side Of Soul" (2012, Shanachie Records)  
John Phillips (died April 18, 1724) was an English pirate captain.
He started his piratical career in 1721 under Thomas Anstis, and stole his own pirate vessel in 1723.
He died in a surprise attack by his own prisoners.
He is noted for the articles of his ship, the "Revenge", one of only four complete sets of pirate articles to survive from the so-called Golden Age of Piracy.