Added templates (test file, module Makefile). Added XLOG/XFLOG macro