added support functions, read_log and dump_log