Added debug and an error condition to create_link_service.