The dynamic sized variable outputString may not be properly initialized.
Second issue, we fill the line for directories beyond fileNameLength, so
the initialization is not always sufficient.
We now initialize outputString statically with the maximum printable
size which should resolve both.
Also clean up some variable declarations.