Updated

A motion filed by lawyers for accused Colorado gunman James Holmes confirms he was being treated by the school psychiatrist to whom he sent a chilling notebook with sketches of him shooting people before his July 20 attack.

In the motion, defense attorneys seek to discover the source of leaks to the media about the package Holmes sent, which was first reported Wednesday by FoxNews.com, citing unnamed sources. Other media outlets scrambled to report the story and may have also talked to sources in position to know about the notebook.

The motion claims that the package contained communications between Holmes and Dr. Lynne Fenton, a psychiatrist at University of Colorado Denver, where Holmes was in a graduate program for neuroscience before dropping out. The package was seized by authorities Monday after it was discovered in a mailroom at the school's Aurora campus.

A law enforcement source told FoxNews.com that the notebook contained sketches and other details that appear to have foreshadowed the horrific attack, in which Holmes allegedly burst into a theater and shot 70 people, killing 12.

"Inside the package was a notebook full of details about how he was going to kill people," the source told FoxNews.com. "There were drawings of what he was going to do in it -- drawings and illustrations of the massacre."

More On This...

Among the images shown in the spiral-bound notebook’s pages were gun-wielding stick figures blowing away other stick figures.

The notebook is now in possession of the FBI, sources told FoxNews.com.

The source told FoxNews.com the package was mailed well before the attack took place but had not been delivered to its intended recipient. The school issued a statement Wednesday evening confirming that a suspicious package was found, but said it was delivered Monday and found on the same day.

Holmes' rampage came at a midnight showing of the Batman movie "The Dark Knight Rises" at the Century 16 Theater in Aurora.

Arapahoe County District Judge William Sylvester, who will rule on the motion, has already issued a gag order barring law enforcement authorities from discussing the case.

FoxNews.com's Jana Winter contributed to this report.