Pass library along with assets so that assets stay alive