What you need to know when buying a franchise