We are sure that most gyms makes a large proportion of their money from people who take out a membership and then who don't want to conitnue.
We hear lots of stories of gyms not having received the cancellation notice - and then refusing to have any dialogue but instead putting the matter immediately into the hands of debt collectors. They never take you to court but prefer to rely on debt collection techniques to get their money.
The fact is that if you break a gym contract then as with most contractual breaches, you are only obliged to re-imburse them their actual losses and they should be prepared to give you a detailed invoice for these as a condition of being paid.
Do everything in writing. Don't rely on phone calls or face-to-face conversations.
You will regret it if you do.