Use sync call to open template, to prevent from opening the same file multiple times at once