Sample C# solution with logging