The console is limited for a reason: To deter people from using it to view output!
Instead, I suggest you use a String to store your data in:
String[] result = {""};
// ...
result[0] = result[0] + "row i is " + i + "/n";
// ...
saveStrings( "output.txt", result );
Untested code, YMMV.