Modify batch.sh to conform the new state transition log method