New feature: transformation can overwrite original file + refactored the csv writing module