Added snippet for logging