updated log mechanism to detect unsuccessful logging