* fix corruption of the file map when multiple files have errors due to poor variable re-use