moved part of templates
add ANSIColor to debug sql output