Refactoring.
Read template from disk or flag