Added service determination to check_service