Use attr_accessor inside singleton class for error_mode

@fw42  Set and get error_mode using attr_accessor in Template singleton class