Added debug to preload in advanced app template