Catch null pointer if template file can't be loaded.