fix bugs

echo sql when error
table should be back quoted
do not use empty regex