Many changes

Use for simulink
better logging for data size