Redirect all errors to the error template, and log them