An inspector who surveyed a Philadelphia building before it collapsed last week, killing six people, has committed suicide, a city official confirmed.

Deputy Mayor Everett Gillison said 52-year-old inspector Ronald Wagenhoffer was found with a self-inflicted gunshot wound in a pickup truck Wednesday night. Wagenhoffer as a 16-year veteran of the Department of Licenses and Inspections and had inspected the building May 14. CBS station KYW reports that was the last inspection before the fatal accident.

Gillison says the department is in mourning and Wagenhoffer "did nothing wrong."

Police said Wagenhoffer sent his wife a text message before shooting himself in the chest, according to KYW. His wife discovered the body at around 9 p.m. Wednesday. He was pronounced dead at the scene.

He also leaves behind a son.

The building was being demolished when it collapsed onto a neighboring Salvation Army Thrift Store on June 5, killing two employees and four customers. Police allege a heavy equipment operator was high on marijuana when it happened.

The city's top prosecutor is convening a grand jury to look into the collapse.