changed matrix filesave output as R-friendly