Adding debug_mode flag to save method

All data except for the data table is saved in textual mode,
the records in data table are stored in text or binary mode
according to debug_mode flag

Signed-off-by: Ilya Nelkenbaum <ilyan@mellanox.com>