This is fixed. If it could useful:
The problem was with the way the variables were declared. I had to declare a class-level variable as static so the any changes applied to this one started reflecting everywhere else. Strangely enough, I dint see the problem when it was executed stand-alone.
EDIT on 13112019: Moving my comment to the answer section, on request:
As its quite long time back, I dont recollect exactly the variable details. But I believe it is one of the following: this.originalFileName, this.inProgressDirLoc, this.processedDirLoc , this.dataMDHolder, this.dataAccIDValueMap, this.dataCountryNameValueMap I had to set them as static as values assigned [or modified] by any of the member was not reflecting during references of the variable within the class.