Added stack size limit (with exceptions)