Implement a pre-processing log for using in Matlab