Display Warning when Template Name is empty

Also clean-up some debug code.