Adding extra argument to save window files to directory.
Saving intermediate error values to txt file.

Signed-off-by: Renato Stoffalette Joao <renatosjoao@gmail.com>