copy template.log

When latex fails, we should copy the log file so the user can see the
log  output of latex.