Add logging for failed template processing.