Come 2017, make it your goal to no longer be that friend who gets into all kinds of trouble with your best friend. Rather, make it your goal to be that friend who confronts the trouble-making best friend and gets him or her to settle down as well. There comes a time where taking illegal risks is too risky and that time is now.
Being in jail, or seeing your friend behind bars, sucks. You feel helpless and embarrassed. You can prevent this kind of scenario by having a heart-to-heart conversation with your friend and figuring out how you guys want to live the rest of your lives. An arrest record will not ruin the rest of your life, but it sure would be better to not have one at all. So aim for that.
However, no one is perfect and people slip up. Sometimes we are in the wrong place at the wrong time.