handle invalid template paths