restored template logging, tab formatting, spacing