Add host, port support for mongodb and debug mode