Fix a bug with writing json log files after starting from chkpt.0000.h5