(CBS Local)– A Wisconsin man experienced a change of heart about taking upskirt videos after a scheme to record the videos literally blew up before he could carry it out, he says.

The 32-year-old man said he purchased a camera that he found he could attach to his shoe, and make the illegal videos, according to Madison Police Chief Michael Koval. The videos are similar to those photos and videos creeps take using phones, but with the smaller, less conspicuous hands-free device on his foot he had a slimmer chance of being caught.

But while testing out the camera at home before he recorded any video the battery of the camera exploded, injuring his foot, according to Officer David Dexheimer.

The man was treated at the hospital for his burns but had the burning desire to confess his actions to his clergyman who recommended that he tell the police and accompanied him to the police station.

At 5:24 p.m. Tuesday, the two men arrived at the West Police District station where the man was counseled about his actions and released from the scene since no illicit video had been taken, the chief wrote.

The investigation is continuing.

Taking upskirt photos or video is illegal. California’s disorderly conduct penal code outlines upskirt violations as a misdemeanor punishable by a sentence of up to one year in jail and a $2,000 fine.

(© Copyright 2018 CBS Broadcasting Inc. All Rights Reserved.)