Upload library only when needed