improved debugging
fixed relative path issue, when passing path to matlab