Added check if template files exists and used template blocks are defined, close #3