modify matlab path
remove spurious write statements