Use hash map to recursively loop over files marked for modification, instead of cumbersome strategy with filepaths.