Improve error message if change template fails