added some extra logging in service endpoint