THURMONT, Md. (WJZ)— Lost on a mountain. That’s how one Maryland hiker nearly rang in the New Year.

Derek Valcourt explains how simple technology helped save his life.

READ MORE: More Than 1,000 Students In Quarantine In Anne Arundel County; County Executive Supports Vaccine Mandate For All Students

It may just look like a blank white screen, but it’s actually an app that turns your iPhone into a flashlight, and it kept one Mount Airy man from ringing in the New Year lost on Catoctin Mountain.

With miles and miles of trails, Gambrill State Park is an ideal place for avid hikers like Christopher Tkacik.

On New Year’s Eve Day, Tkacik and his dog Boo set out for their first ever hike in Gambrills. He started on the black trail, moved to the yellow trail but somehow ended up on a blue trail.  

Hours later, darkness began to set in and so did his worry.

“I still argue with my wife that I wasn’t lost, but I guess I was,” he said.

His cell phone’s GPS wasn’t helping him. But Tkacik still had a cell phone signal and half the battery charge.

READ MORE: Residents & Business Owners Question The Future Of The Inner Harbor's Gallery Mall

And “911 said ‘Stay where you are. We are sending a helicopter,’” Tkacik recalled.

Here’s where that flashlight app came in. When the rescue helicopters flew overhead, Tkacik waived his phone flashlight. Rescuers spotted him and sent in the help.

The helicopter dropped two rescuers who then guided Tkacik and his dog out of the park eight hours after he first got there.

When asked what lessons did he take away from this, Tkacik responded, “You always gotta be ready.”

Tkacik’s thankful for the help and still got to celebrate New Year’s with his family.

“I got home around 9:30. We still went to the party.  When I showed up the guy hosting the party had a flashlight to show me, to guide me in,” he said.

The ordeal hasn’t stopped Tkacik from hiking. He got in a four-mile hike Monday morning and plans to come back out to hike Catoctin Mountain someday.   

MORE NEWS: Shortage In COVID Testing Kits Driving Up Lab-Based Demand

Authorities say this is a perfect example of why it’s always important to take a cell phone with you on long hikes and make sure someone knows where you will be hiking.