fixed error handling example
removed debug code
fixed custom server example