Keeping consistency according to the data and data indices to be written to
mtm file

Signed-off-by: Renato Stoffalette Joao <renatosjoao@gmail.com>