prepare loader before loading templates