Adding some debugs. Preparing for C# version