add Error and LogError table generation and dt wr