Datafile in: Fix bug that crashes app when loading a .mat file
Also take care of the following "fix-me" left inside the code:
/* need to clean up, huge memory leak occurs here */