show new generated errorstack and fixed typeof check