add state_log table
minor fix of preimport batch script