added datamatrix_to file functionality