fixed matlab logging