added support for stack overflow errors logging