Fix and improve store_data_into_file

A bug raised when the filename didnt contains least list ./
If the data is tabular, the method encodes automatically the elements
Remove main-logic-code