Add proper error handling on SetRoutes and Listen.

Some examples had this, but not all. Fixed.