replace Writeln with Debugln