Police have arrested a man who they say accidentally filmed himself while installing a secret video camera in a bathroom at his workplace.

The San Antonio Express-News reports 44-year-old Ray De la Cruz was released from the Bexar County Jail on Christmas Eve after he posted $10,000 bond.

An arrest affidavit says De la Cruz secretly recorded his co-workers using the restroom. Police say De la Cruz was confronted and fired by his boss after an employee found an iPod taped to a wall in a storage locker in front of a toilet.

Police say De la Cruz was wearing his nametag when the camera captured him setting up the device. The affidavit says he confessed to his employer. It does not mention the name of the workplace.