add check before loading assets