Apparently removing the tracking of td error results in errors. The code tracks the td-error in a map, but does not write it to a file.