Moved initialization of endMsg until after loading of variables.