Add stacksize check to biogenerator