Move for to code. Add stack trace to make test easier.