26-year-old Nicholas Wig allegedly broke into a St. Paul, Minnesota home last week and stole several items, and he might have gotten away with it too if it wasn’t for one dumb act. Police say that the Minnesota man, while inside the home of James Wood, logged onto Facebook but then forgot to log off. As WCCO CBS Minnesota reports, this helped lead to his arrest.

When homeowner James Wood arrived back at his house, he discovered it had been ransacked. Credit cards, cash, and a watch were missing. Strangely enough, a pair of wet sneakers and a pair of wet pants not belonging to Mr. Wood were left behind. “[I] kind of started to panic,” the St. Paul resident told WCCO. However, when he went on to his computer, he noticed an important clue as to who had done the deed, telling the station, “He pulled up his Facebook profile, he left it up.” That’s right, Mr. Wig had forgotten to log off his account.

Homeowner James Wood was able to laugh about the robbery after. (WCCO)

Mr. Wood posted to Facebook using Mr. Wig’s profile, leaving his own phone number in hopes that the alleged thief would get in touch with him. When Mr. Wig texted him later in the day, the homeowner replied, “You left a few things at my house last night (the aforementioned sneakers and pants), how can I get them back to you?” Mr. Wig agreed to meet with Mr. Wood later, presumably under the assumption that they would make an exchange. However, when the homeowner spotted the man who had done him wrong, he immediately called police.

Police arrived and arrested Mr. Wig, who was wearing Mr. Wood’s watch at the time. He faces up to 10 years in prison and $20,000 in fines if he is convicted.

More info: WCCO