When it comes to legal and financials, plan ahead to avoid surprises