added debug and support for express/connect