added support for service ids
added some error reporting