1. you can file a petition for custody of your child under section 25 of the guardianship and wards act.
2. you can get the consent terms drafted through an able advocate who can protect your rights for future, also if you are going for mutual consent divorce then there is no need to file a petition under section 25.
3. you can ensure this only by drafting the mutual consent terms wisely.
Regards
Let me know if I can be of further help.